diff options
author | Vitaly Takmazov | 2018-04-04 23:40:04 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-04 23:40:04 +0300 |
commit | 310975ef449254f3fbd504b408b9d6853280be39 (patch) | |
tree | 9451e474a04aaa3bf250ef16a276d90329ed15e5 /juick-server | |
parent | 33e5ed803d8165c265b1ce435716700db3b576d4 (diff) |
fix email replies
Diffstat (limited to 'juick-server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Post.java | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |