aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-10-06 23:39:10 +0300
committerGravatar Vitaly Takmazov2018-10-06 23:39:10 +0300
commite882914b29f384d3f530865737cc7de3790e5b0e (patch)
treeb87b0a1055903084882bae4c8eedfbd554687105 /juick-server/src/main/java/com/juick/server
parent0b065e1e0547885294d03df54d178587d801a15a (diff)
HTML replies
Diffstat (limited to 'juick-server/src/main/java/com/juick/server')
-rw-r--r--juick-server/src/main/java/com/juick/server/ActivityPubManager.java2
-rw-r--r--juick-server/src/main/java/com/juick/server/EmailManager.java2
-rw-r--r--juick-server/src/main/java/com/juick/server/api/rss/RepliesView.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/juick-server/src/main/java/com/juick/server/ActivityPubManager.java b/juick-server/src/main/java/com/juick/server/ActivityPubManager.java
index 4adfafea..c1790deb 100644
--- a/juick-server/src/main/java/com/juick/server/ActivityPubManager.java
+++ b/juick-server/src/main/java/com/juick/server/ActivityPubManager.java
@@ -196,7 +196,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
note.setCc(Collections.singletonList(followersUri(msg.getUser())));
}
note.setPublished(msg.getTimestamp());
- note.setContent(MessageUtils.formatMessage(msg.getText()));
+ note.setContent(msg.isHtml() ? msg.getText() : MessageUtils.formatMessage(msg.getText()));
if (StringUtils.isNotBlank(msg.getAttachmentType())) {
Image attachment = new Image();
attachment.setId(msg.getAttachment().getMedium().getUrl());
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 726da4b9..1cdafac6 100644
--- a/juick-server/src/main/java/com/juick/server/EmailManager.java
+++ b/juick-server/src/main/java/com/juick/server/EmailManager.java
@@ -114,7 +114,7 @@ public class EmailManager implements NotificationListener {
String htmlText = String.format("%s<br /><br />--<br />You are receiving this because you are subscribed to this user" +
", discussion, tag or mentioned. 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),
+ msg.isHtml() ? msg.getText() : MessageUtils.formatHtml(msg), formatUrl(msg),
msg.getMid(), msg.getRid(), hash, hash);
sendEmail(email, subject, plainText, htmlText, headers);
}
diff --git a/juick-server/src/main/java/com/juick/server/api/rss/RepliesView.java b/juick-server/src/main/java/com/juick/server/api/rss/RepliesView.java
index f9d7109e..a0ab801e 100644
--- a/juick-server/src/main/java/com/juick/server/api/rss/RepliesView.java
+++ b/juick-server/src/main/java/com/juick/server/api/rss/RepliesView.java
@@ -78,7 +78,7 @@ public class RepliesView extends AbstractRssFeedView {
Item item = new Item();
String messageUrl = String.format("http://juick.com/m/%d#%d", msg.getMid(), msg.getRid());
String messageTitle = String.format("@%s:", msg.getUname());
- String messageDescription = MessageUtils.formatMessage(msg.getDescription());
+ String messageDescription = msg.isHtml() ? msg.getDescription() : MessageUtils.formatMessage(msg.getDescription());
item.setLink(messageUrl);
//item.setGuid(messageUrl);
item.setTitle(messageTitle);