aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-01-05 12:48:04 +0300
committerGravatar Vitaly Takmazov2018-01-05 12:48:04 +0300
commit0dc51d8768cba03ecff82a5c0dc8c7ece695af6b (patch)
treed25697f4311604b35fdb23f9d67f8d1c0ffb46bb /juick-api/src/main/java/com
parenta5dd9d33e7ef2acffbf8a7e3c1fc5e32767b377c (diff)
formatHtml
Diffstat (limited to 'juick-api/src/main/java/com')
-rw-r--r--juick-api/src/main/java/com/juick/api/EmailManager.java4
1 files changed, 1 insertions, 3 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 af66466f..2ada6ab9 100644
--- a/juick-api/src/main/java/com/juick/api/EmailManager.java
+++ b/juick-api/src/main/java/com/juick/api/EmailManager.java
@@ -83,12 +83,10 @@ public class EmailManager implements ApplicationListener<MessageEvent> {
StringUtils.isNotEmpty(msg.getText()) ? formatPost(msg) : "", formatUrl(msg));
MimeBodyPart textBodyPart = new MimeBodyPart();
textBodyPart.setContent(plainText, "text/plain; charset=UTF-8");
- boolean isCode = msg.getTags().stream().anyMatch(t -> t.getName().equals("code"));
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()) ? isCode ? MessageUtils.formatMessageCode(msg.getText())
- : MessageUtils.formatMessage(msg.getText()) : "", formatUrl(msg),
+ StringUtils.isNotEmpty(msg.getText()) ? MessageUtils.formatHtml(msg) : "", formatUrl(msg),
userService.getHashByUID(userService.getUserByEmail(email).getUid()));
MimeBodyPart htmlBodyPart = new MimeBodyPart();
htmlBodyPart.setContent(htmlText, "text/html; charset=UTF-8");