diff rhodecode/model/notification.py @ 2387:7d517a35b6c9 beta

Don't send emails to person who comment on changeset
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 04 Jun 2012 22:03:40 +0200
parents a27e4d44237e
children 91fae60bf2b6 9b623dcddb02
line wrap: on
line diff
--- a/rhodecode/model/notification.py	Mon Jun 04 21:37:41 2012 +0200
+++ b/rhodecode/model/notification.py	Mon Jun 04 22:03:40 2012 +0200
@@ -103,8 +103,11 @@
         if with_email is False:
             return notif
 
-        # send email with notification
-        for rec in recipients_objs:
+        #don't send email to person who created this comment
+        rec_objs = set(recipients_objs).difference(set([created_by_obj]))
+
+        # send email with notification to all other participants
+        for rec in rec_objs:
             email_subject = NotificationModel().make_description(notif, False)
             type_ = type_
             email_body = body