From 27a3d58629617f5b05436921193eaf170bab99a7 Mon Sep 17 00:00:00 2001 From: Amogh M Aradhya Date: Thu, 26 Oct 2023 13:18:44 +0530 Subject: [PATCH 1/2] Change the role for the comment notification to project_crew --- funnel/models/notification_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/funnel/models/notification_types.py b/funnel/models/notification_types.py index a8fc70102..3f864c54e 100644 --- a/funnel/models/notification_types.py +++ b/funnel/models/notification_types.py @@ -173,7 +173,7 @@ class NewCommentNotification(Notification[Commentset, Comment], type='comment_ne title = __("When there is a new comment on something I’m involved in") exclude_actor = True - roles = ['replied_to_commenter', 'document_subscriber'] + roles = ['replied_to_commenter', 'project_crew'] class CommentReplyNotification(Notification[Comment, Comment], type='comment_reply'): From 4991d3c8aac4a5077d8e29630cac342c30317a5f Mon Sep 17 00:00:00 2001 From: Amogh M Aradhya Date: Thu, 26 Oct 2023 13:34:52 +0530 Subject: [PATCH 2/2] removed NewCommentNotification dispatch --- funnel/models/notification_types.py | 2 +- funnel/views/comment.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/funnel/models/notification_types.py b/funnel/models/notification_types.py index 3f864c54e..a8fc70102 100644 --- a/funnel/models/notification_types.py +++ b/funnel/models/notification_types.py @@ -173,7 +173,7 @@ class NewCommentNotification(Notification[Commentset, Comment], type='comment_ne title = __("When there is a new comment on something I’m involved in") exclude_actor = True - roles = ['replied_to_commenter', 'project_crew'] + roles = ['replied_to_commenter', 'document_subscriber'] class CommentReplyNotification(Notification[Comment, Comment], type='comment_reply'): diff --git a/funnel/views/comment.py b/funnel/views/comment.py index 0d0d82a4b..ccbebf2cc 100644 --- a/funnel/views/comment.py +++ b/funnel/views/comment.py @@ -334,10 +334,7 @@ def reply(self) -> ReturnView: self.obj, ) dispatch_notification( - CommentReplyNotification( - document=comment.in_reply_to, fragment=comment - ), - NewCommentNotification(document=comment.commentset, fragment=comment), + CommentReplyNotification(document=comment.in_reply_to, fragment=comment) ) return { 'status': 'ok',