Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Notification: bug fix
Browse files Browse the repository at this point in the history
Problem: Mentioned users in a comment were missing from the notification receivers.
Solution: Find mantioned users in a comment and add them to receivers.
  • Loading branch information
Keesun Baik committed Mar 12, 2015
1 parent d969d62 commit cd67cfb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/models/NotificationEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,11 @@ public static NotificationEvent forComment(Comment comment, User author, EventTy

NotificationEvent notiEvent = createFrom(author, comment);
notiEvent.title = formatReplyTitle(post);
notiEvent.receivers = getReceivers(post, author);
notiEvent.eventType = eventType;
Set<User> receivers = getReceivers(post, author);
receivers.addAll(getMentionedUsers(comment.contents));
receivers.remove(author);
notiEvent.receivers = receivers;
notiEvent.oldValue = null;
notiEvent.newValue = comment.contents;
notiEvent.resourceType = comment.asResource().getType();
Expand Down

0 comments on commit cd67cfb

Please sign in to comment.