From 0f6f433551cfa6c54e1b6a7fd23c649892d98d2c Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 7 Mar 2013 15:08:21 -0500 Subject: [PATCH] official comments now sent to ALL wishers except for commenter --- core/signals.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/signals.py b/core/signals.py index b1ddda8a..2601e88c 100644 --- a/core/signals.py +++ b/core/signals.py @@ -114,11 +114,12 @@ from django.contrib.comments.signals import comment_was_posted def notify_comment(comment, request, **kwargs): logger.info('comment %s notifying' % comment.pk) other_commenters = User.objects.filter(comment_comments__content_type=comment.content_type, comment_comments__object_pk=comment.object_pk).distinct().exclude(id=comment.user.id) - other_wishers = comment.content_object.wished_by().exclude(id=comment.user.id).exclude(id__in=other_commenters) + all_wishers = comment.content_object.wished_by().exclude(id=comment.user.id) + other_wishers = all_wishers.exclude(id__in=other_commenters) domain = Site.objects.get_current().domain if comment.content_object.last_campaign() and comment.user in comment.content_object.last_campaign().managers.all(): #official - notification.queue(other_wishers, "wishlist_official_comment", {'comment':comment, 'domain':domain}, True) + notification.queue(all_wishers, "wishlist_official_comment", {'comment':comment, 'domain':domain}, True) else: notification.queue(other_commenters, "comment_on_commented", {'comment':comment, 'domain':domain}, True) notification.queue(other_wishers, "wishlist_comment", {'comment':comment, 'domain':domain}, True)