diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2012-03-01 00:30:41 +0200 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2012-03-01 00:30:41 +0200 |
commit | 1b948f0250276a4cde771d0e81fd35f609fbcf1d (patch) | |
tree | c14347e3f12576b6ef9418ff9b32977accd10ee9 /rhodecode/model/comment.py | |
parent | 75a5da887992c908fc62355bad1cb4a1d254ef4a (diff) |
code garden
--HG--
branch : beta
Diffstat (limited to 'rhodecode/model/comment.py')
-rw-r--r-- | rhodecode/model/comment.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/rhodecode/model/comment.py b/rhodecode/model/comment.py index dc20c1eb..8e23ee58 100644 --- a/rhodecode/model/comment.py +++ b/rhodecode/model/comment.py @@ -92,22 +92,27 @@ class ChangesetCommentsModel(BaseModel): ) ) body = text + + # get the current participants of this changeset recipients = ChangesetComment.get_users(revision=revision) + # add changeset author recipients += [User.get_by_email(author)] - NotificationModel().create(created_by=user_id, subject=subj, - body=body, recipients=recipients, - type_=Notification.TYPE_CHANGESET_COMMENT) + NotificationModel().create( + created_by=user_id, subject=subj, body=body, + recipients=recipients, type_=Notification.TYPE_CHANGESET_COMMENT + ) mention_recipients = set(self._extract_mentions(body))\ .difference(recipients) if mention_recipients: subj = _('[Mention]') + ' ' + subj - NotificationModel().create(created_by=user_id, subject=subj, - body=body, - recipients=mention_recipients, - type_=Notification.TYPE_CHANGESET_COMMENT) + NotificationModel().create( + created_by=user_id, subject=subj, body=body, + recipients=mention_recipients, + type_=Notification.TYPE_CHANGESET_COMMENT + ) return comment |