From 310975ef449254f3fbd504b408b9d6853280be39 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 4 Apr 2018 23:40:04 +0300 Subject: fix email replies --- juick-server/src/main/java/com/juick/server/api/Post.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'juick-server/src/main/java') diff --git a/juick-server/src/main/java/com/juick/server/api/Post.java b/juick-server/src/main/java/com/juick/server/api/Post.java index 1dd18b66..827b9ffc 100644 --- a/juick-server/src/main/java/com/juick/server/api/Post.java +++ b/juick-server/src/main/java/com/juick/server/api/Post.java @@ -225,7 +225,9 @@ public class Post { body[0] = rid > 0 ? String.format("#%d/%d %s", mid, rid, body[0]) : String.format("#%d %s", mid, body[0]); } - xmppConnection.incomingMessageJuick(visitor, null, body[0], URI.create(String.format("juick://%s", attachmentFName[0]))); + URI attachmentUri = StringUtils.isNotEmpty(attachmentFName[0]) ? URI.create(String.format("juick://%s", attachmentFName[0])) + : URI.create(StringUtils.EMPTY); + xmppConnection.incomingMessageJuick(visitor, null, body[0], attachmentUri); } else { logger.info("not registered: {}", from); } -- cgit v1.2.3