branch develop updated (70f9d3a -> d143ba0)
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 70f9d3a retour a une version précédente de riot suite à regression new d143ba0 a la création d'un sondage n'envoyer le mail que si le courriel n'est pas vide 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 d143ba0b8025eb750152ebb4a7e26ed1e770b54a Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Mar 30 15:35:46 2017 +0200 a la création d'un sondage n'envoyer le mail que si le courriel n'est pas vide Summary of changes: .../chorem/pollen/services/service/NotificationService.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 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 d143ba0b8025eb750152ebb4a7e26ed1e770b54a Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Mar 30 15:35:46 2017 +0200 a la création d'un sondage n'envoyer le mail que si le courriel n'est pas vide --- .../chorem/pollen/services/service/NotificationService.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 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 8323ab4..0e78416 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 @@ -21,6 +21,7 @@ package org.chorem.pollen.services.service; * #L% */ +import org.apache.commons.lang3.StringUtils; import org.chorem.pollen.persistence.entity.Choice; import org.chorem.pollen.persistence.entity.Comment; import org.chorem.pollen.persistence.entity.FavoriteList; @@ -105,12 +106,14 @@ public class NotificationService extends PollenServiceSupport { public void onPollCreated(Poll poll, PollenUIContext pollenUIContext) { - EmailService emailService = getEmailService(); - PollCreatedEmail email = emailService.newPollCreatedEmail(poll, pollenUIContext); + if (StringUtils.isNotBlank(poll.getCreator().getEmail())) { + EmailService emailService = getEmailService(); + PollCreatedEmail email = emailService.newPollCreatedEmail(poll, pollenUIContext); - email.addTo(poll.getCreator().getEmail()); + email.addTo(poll.getCreator().getEmail()); - emailService.send(email); + emailService.send(email); + } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm