Skip to content

Commit

Permalink
SAK-44486 Forums - email notification is sent to users who didn't par…
Browse files Browse the repository at this point in the history
…ticipate in conversation (sakaiproject#8769)
  • Loading branch information
austin48 authored Dec 3, 2020
1 parent c798cf8 commit 04c21a3
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3664,6 +3664,7 @@ public String processDfMsgPost()
this.composeTitle = null;

this.attachments.clear();
this.selectedThread.clear();

// refresh page with unread status
selectedTopic = getDecoratedTopic(selectedTopic.getTopic());
Expand Down Expand Up @@ -7375,13 +7376,14 @@ public void sendEmailNotification(Message reply, DiscussionMessageBean currthre
while (iter.hasNext()){
DiscussionMessageBean decoMessage = (DiscussionMessageBean) iter.next();
String threadauthor = decoMessage.getMessage().getCreatedBy();
EmailNotification authorNotificationLevel = emailNotificationManager.getEmailNotification(threadauthor);
// only add level 1 users , since we've already got level2 users.
if (EmailNotification.EMAIL_REPLY_TO_MY_MESSAGE.equalsIgnoreCase(authorNotificationLevel.getNotificationLevel())){
if (log.isDebugEnabled()){
log.debug("The author: " + threadauthor + " wants to be notified");
// don't include the reply author
if (!threadauthor.equals(reply.getCreatedBy())) {
EmailNotification authorNotificationLevel = emailNotificationManager.getEmailNotification(threadauthor);
// only add level 1 users , since we've already got level2 users.
if (EmailNotification.EMAIL_REPLY_TO_MY_MESSAGE.equalsIgnoreCase(authorNotificationLevel.getNotificationLevel())){
log.debug("The author: {} wants to be notified", threadauthor);
userlist.add(threadauthor);
}
userlist.add(threadauthor);
}
}

Expand Down Expand Up @@ -9254,4 +9256,3 @@ private void loadTopicDataInTopicBean(DiscussionTopic topic, DiscussionTopicBean
}

}

0 comments on commit 04c21a3

Please sign in to comment.