From 0a3936561d17ee70c9fecac871ea8a4e097cb518 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 28 Mar 2018 21:34:16 +0300 Subject: server: telegram PMs --- .../src/main/java/com/juick/formatters/PlainTextFormatter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'juick-common/src/main') diff --git a/juick-common/src/main/java/com/juick/formatters/PlainTextFormatter.java b/juick-common/src/main/java/com/juick/formatters/PlainTextFormatter.java index 68799b83..a47a6113 100644 --- a/juick-common/src/main/java/com/juick/formatters/PlainTextFormatter.java +++ b/juick-common/src/main/java/com/juick/formatters/PlainTextFormatter.java @@ -37,8 +37,9 @@ public class PlainTextFormatter { public static String formatPost(Message jmsg, boolean markdown) { StringBuilder sb = new StringBuilder(); + boolean isPM = jmsg.getMid() == 0; boolean isReply = jmsg.getRid() > 0; - String title = isReply ? "Reply by @" : "@"; + String title = isReply ? "Reply by @" : isPM ? "Private message from @" : "@"; String subtitle = isReply ? markdown ? MessageUtils.escapeMarkdown(StringUtils.defaultString(jmsg.getReplyQuote())) : jmsg.getReplyQuote() : markdown ? MessageUtils.getMarkdownTags(jmsg) : MessageUtils.getTagsString(jmsg); -- cgit v1.2.3