aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com/juick/api')
-rw-r--r--juick-api/src/main/java/com/juick/api/EmailManager.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-api/src/main/java/com/juick/api/EmailManager.java b/juick-api/src/main/java/com/juick/api/EmailManager.java
index 411e86ec..6ba790d3 100644
--- a/juick-api/src/main/java/com/juick/api/EmailManager.java
+++ b/juick-api/src/main/java/com/juick/api/EmailManager.java
@@ -6,6 +6,7 @@ import com.juick.server.util.HttpBadRequestException;
import com.juick.service.EmailService;
import com.juick.service.MessagesService;
import com.juick.service.SubscriptionService;
+import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
@@ -75,7 +76,7 @@ public class EmailManager implements ApplicationListener<MessageEvent> {
message.setSubject(subject);
message.setText(String.format("%s\n%s\n\n---\nYou are receiving this because you are subscribed to this user " +
"or discussion. Configure notifications at https://juick.com/settings",
- formatPost(msg), formatUrl(msg)));
+ StringUtils.isNotEmpty(msg.getText()) ? formatPost(msg) : "", formatUrl(msg)));
message.saveChanges();
transport.connect();
transport.sendMessage(message, message.getAllRecipients());