diff options
author | Vitaly Takmazov | 2018-01-06 09:18:49 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-01-06 09:18:49 +0300 |
commit | fdb9d0e4569eab3a5b4ddf7f63f5e505249b8ac3 (patch) | |
tree | e10bb2bbfbad39db9a49a53bc021eae88e828a0f | |
parent | 0dc51d8768cba03ecff82a5c0dc8c7ece695af6b (diff) |
email: cleanup html template
-rw-r--r-- | juick-api/src/main/java/com/juick/api/EmailManager.java | 2 | ||||
-rw-r--r-- | juick-core/src/main/java/com/juick/util/MessageUtils.java | 6 |
2 files changed, 4 insertions, 4 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 2ada6ab9..1c105ef9 100644 --- a/juick-api/src/main/java/com/juick/api/EmailManager.java +++ b/juick-api/src/main/java/com/juick/api/EmailManager.java @@ -83,7 +83,7 @@ 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"); - String htmlText = String.format("%s<br /><br />--<br />You are receiving this because you are subscribed to this user " + + 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), diff --git a/juick-core/src/main/java/com/juick/util/MessageUtils.java b/juick-core/src/main/java/com/juick/util/MessageUtils.java index 91cc7870..d032ce8e 100644 --- a/juick-core/src/main/java/com/juick/util/MessageUtils.java +++ b/juick-core/src/main/java/com/juick/util/MessageUtils.java @@ -146,11 +146,11 @@ public class MessageUtils { public static String formatHtml(Message jmsg) { StringBuilder sb = new StringBuilder(); boolean isReply = jmsg.getRid() > 0; - String title = isReply ? "<h3>Reply by @" : "@"; - String subtitle = isReply ? "<q>" + jmsg.getReplyQuote() + "</q>" : "<i>" + jmsg.getTagsString() + "</i>"; + String title = isReply ? "<b>Reply by @" : "<b>@"; + String subtitle = isReply ? "<blockquote>" + jmsg.getReplyQuote() + "</blockquote>" : "<i>" + jmsg.getTagsString() + "</i>"; boolean isCode = jmsg.getTags().stream().anyMatch(t -> t.getName().equals("code")); - sb.append(title).append(jmsg.getUser().getName()).append(":</h3></br/>") + sb.append(title).append(jmsg.getUser().getName()).append(":</b></br/>") .append(subtitle).append("<br/>") .append(isCode ? formatMessageCode(jmsg.getText()) : formatMessage(jmsg.getText())).append("<br />"); if (StringUtils.isNotEmpty(jmsg.getAttachmentType())) { |