branch develop updated (55391723 -> 42b13e1a)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from 55391723 wording new 42b13e1a send choice adding and comment notifications only if notifications are set for the poll The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 42b13e1ab3a8f472fbee250950052e0567e8d9cc Author: Kevin Morin <morin@codelutin.com> Date: Thu Jun 8 11:38:15 2017 +0200 send choice adding and comment notifications only if notifications are set for the poll Summary of changes: .../services/service/NotificationService.java | 40 +++++++++++++--------- 1 file changed, 24 insertions(+), 16 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 42b13e1ab3a8f472fbee250950052e0567e8d9cc Author: Kevin Morin <morin@codelutin.com> Date: Thu Jun 8 11:38:15 2017 +0200 send choice adding and comment notifications only if notifications are set for the poll --- .../services/service/NotificationService.java | 40 +++++++++++++--------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/NotificationService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/NotificationService.java index 71875890..d132ee2f 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/NotificationService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/NotificationService.java @@ -202,10 +202,12 @@ public class NotificationService extends PollenServiceSupport { } public void onChoiceAdded(Poll poll, Choice choice) { - EmailService emailService = getEmailService(); - ChoiceAddedEmail email = emailService.newChoiceAddedEmail(poll, choice); - email.addTo(poll.getCreator().getEmail()); - emailService.send(email); + if (poll.isVoteNotification()) { + EmailService emailService = getEmailService(); + ChoiceAddedEmail email = emailService.newChoiceAddedEmail(poll, choice); + email.addTo(poll.getCreator().getEmail()); + emailService.send(email); + } } public void onChoiceEdited(Poll poll, Choice choice) { @@ -217,24 +219,30 @@ public class NotificationService extends PollenServiceSupport { } public void onCommentAdded(Poll poll, Comment comment) { - EmailService emailService = getEmailService(); - CommentAddedEmail email = emailService.newCommentAddedEmail(poll, comment); - email.addTo(poll.getCreator().getEmail()); - emailService.send(email); + if (poll.isVoteNotification()) { + EmailService emailService = getEmailService(); + CommentAddedEmail email = emailService.newCommentAddedEmail(poll, comment); + email.addTo(poll.getCreator().getEmail()); + emailService.send(email); + } } public void onCommentEdited(Poll poll, Comment comment) { - EmailService emailService = getEmailService(); - CommentEditedEmail email = emailService.newCommentEditedEmail(poll, comment); - email.addTo(poll.getCreator().getEmail()); - emailService.send(email); + if (poll.isVoteNotification()) { + EmailService emailService = getEmailService(); + CommentEditedEmail email = emailService.newCommentEditedEmail(poll, comment); + email.addTo(poll.getCreator().getEmail()); + emailService.send(email); + } } public void onCommentDeleted(Poll poll, Comment comment) { - EmailService emailService = getEmailService(); - CommentDeletedEmail email = emailService.newCommentDeletedEmail(poll, comment); - email.addTo(poll.getCreator().getEmail()); - emailService.send(email); + if (poll.isVoteNotification()) { + EmailService emailService = getEmailService(); + CommentDeletedEmail email = emailService.newCommentDeletedEmail(poll, comment); + email.addTo(poll.getCreator().getEmail()); + emailService.send(email); + } } public void onVoteAdded(Poll poll, Vote vote) { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm