aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/EmailManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/EmailManager.java')
-rw-r--r--juick-server/src/main/java/com/juick/server/EmailManager.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/EmailManager.java b/juick-server/src/main/java/com/juick/server/EmailManager.java
index 2bea7060..aaebaac8 100644
--- a/juick-server/src/main/java/com/juick/server/EmailManager.java
+++ b/juick-server/src/main/java/com/juick/server/EmailManager.java
@@ -93,12 +93,13 @@ public class EmailManager implements ApplicationListener<MessageEvent> {
", discussion or tag. Reply to this email directly or view it on Juick: %s.",
formatPost(msg), formatUrl(msg));
MimeBodyPart textBodyPart = new MimeBodyPart();
+ String hash = userService.getHashByUID(userService.getUserByEmail(email).getUid());
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." +
+ ", discussion or tag. Reply to this email directly or <a href=\"%s\"><img src=\"https://api.juick.com/thread/mark_read/%d-%d.gif?hash=%s\" />view it</a> on Juick." +
"<br /><a href=\"https://juick.com/settings?hash=%s\">Configure or disable notifications</a>",
MessageUtils.formatHtml(msg), formatUrl(msg),
- userService.getHashByUID(userService.getUserByEmail(email).getUid()));
+ msg.getMid(), msg.getRid(), hash, hash);
MimeBodyPart htmlBodyPart = new MimeBodyPart();
htmlBodyPart.setContent(htmlText, "text/html; charset=UTF-8");
Multipart multipart = new MimeMultipart("alternative");