From 31a4570cbd137ebe0ee3e1f08e1dcf8545eef83f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 28 Oct 2017 11:37:09 +0300 Subject: core: correctly check for attachment --- juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-core/src/main/java') diff --git a/juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java b/juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java index 06ae8a0a..40eb6939 100644 --- a/juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java +++ b/juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java @@ -38,7 +38,7 @@ public class PlainTextFormatter { String subtitle = isReply ? jmsg.getReplyQuote() : jmsg.getTagsString(); sb.append(title).append(jmsg.getUser().getName()).append(":\n") .append(subtitle).append("\n").append(jmsg.getText()).append("\n"); - if (jmsg.getPhoto() != null) { + if (StringUtils.isNotEmpty(jmsg.getAttachmentType())) { sb.append(jmsg.getAttachment().getMedium().getUrl()); } return sb.toString(); -- cgit v1.2.3