aboutsummaryrefslogtreecommitdiff
path: root/juick-common
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-28 21:34:16 +0300
committerGravatar Vitaly Takmazov2018-03-28 21:34:16 +0300
commit0a3936561d17ee70c9fecac871ea8a4e097cb518 (patch)
tree2095c0700c3027465a1733f310a4bf1d81f82ccd /juick-common
parent4b3ddcd138af69f504a9a08281edc1c2e7eb0c7a (diff)
server: telegram PMs
Diffstat (limited to 'juick-common')
-rw-r--r--juick-common/src/main/java/com/juick/formatters/PlainTextFormatter.java3
1 files changed, 2 insertions, 1 deletions
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);