Skip to content

Commit

Permalink
SAK-31791 Avoid send messages to not valid destinations. (sakaiprojec…
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjmerono authored and ottenhoff committed Sep 29, 2016
1 parent ad6a1cf commit 874af93
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ protected void onSubmit(AjaxRequestTarget target, Form form) {
String threadId = ProfileUtils.generateUuid();

//save it, it will be abstracted into its proper parts and email notifications sent
if(messagingLogic.sendNewMessage(newMessage.getTo(), newMessage.getFrom(), threadId, newMessage.getSubject(), newMessage.getMessage())) {
if(newMessage.getTo()!=null && messagingLogic.sendNewMessage(newMessage.getTo(), newMessage.getFrom(), threadId, newMessage.getSubject(), newMessage.getMessage())) {

//success
formFeedback.setDefaultModel(new ResourceModel("success.message.send.ok"));
Expand Down

0 comments on commit 874af93

Please sign in to comment.