From a1703a67b166fd2e1616acb4e9ba0cdb218b521c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 16 Apr 2018 15:20:58 +0300 Subject: server: mark messages read from email notifications --- juick-server/src/main/java/com/juick/server/EmailManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server/EmailManager.java') 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 { ", 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

--
You are receiving this because you are subscribed to this user" + - ", discussion or tag. Reply to this email directly or view it on Juick." + + ", discussion or tag. Reply to this email directly or view it on Juick." + "
Configure or disable notifications", 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"); -- cgit v1.2.3