diff options
author | Vitaly Takmazov | 2018-02-06 12:42:46 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-02-06 12:42:46 +0300 |
commit | 8c2b058d94c57b8e6e3f0a85d757ad9cc5fa19ec (patch) | |
tree | db40317031b2fce2f1be2a62cd29a3e8c25eece6 /juick-api/src/main | |
parent | 18c0b338455c4ebf16d3720b6f9a92d17b0d5b70 (diff) |
api: fix images when body is empty
Diffstat (limited to 'juick-api/src/main')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/EmailManager.java | 4 |
1 files changed, 2 insertions, 2 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 f30413c68..02ad60fdf 100644 --- a/juick-api/src/main/java/com/juick/api/EmailManager.java +++ b/juick-api/src/main/java/com/juick/api/EmailManager.java @@ -84,13 +84,13 @@ public class EmailManager implements ApplicationListener<MessageEvent> { message.setSubject(subject); String plainText = String.format("%s\n\n--\nYou are receiving this because you are subscribed to this user " + ", discussion or tag. Reply to this email directly or view it on Juick: %s.", - StringUtils.isNotEmpty(msg.getText()) ? formatPost(msg) : "", formatUrl(msg)); + formatPost(msg), formatUrl(msg)); MimeBodyPart textBodyPart = new MimeBodyPart(); textBodyPart.setContent(plainText, "text/plain; charset=UTF-8"); String htmlText = String.format("%s<br /><br />--<br />You are receiving this because you are subscribed to this user" + ", discussion or tag. Reply to this email directly or <a href=\"%s\">view it</a> on Juick." + "<br /><a href=\"https://juick.com/settings?hash=%s\">Configure or disable notifications</a>", - StringUtils.isNotEmpty(msg.getText()) ? MessageUtils.formatHtml(msg) : "", formatUrl(msg), + MessageUtils.formatHtml(msg), formatUrl(msg), userService.getHashByUID(userService.getUserByEmail(email).getUid())); MimeBodyPart htmlBodyPart = new MimeBodyPart(); htmlBodyPart.setContent(htmlText, "text/html; charset=UTF-8"); |