diff options
author | Vitaly Takmazov | 2018-03-30 17:52:53 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-30 17:52:53 +0300 |
commit | bda2d764a9c187da5aa8cd74fb8c4a9574d3996e (patch) | |
tree | 2d5bc98a5744f8f6a0ec4e7f9893c2355235267c /juick-server/src/main/java/com/juick/server/CommandsManager.java | |
parent | 7eb13edc1720b13924d7cbe715be67a535f0e02e (diff) |
xmpp integration tests
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/CommandsManager.java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/CommandsManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/CommandsManager.java b/juick-server/src/main/java/com/juick/server/CommandsManager.java index 9178dbb9..6458382f 100644 --- a/juick-server/src/main/java/com/juick/server/CommandsManager.java +++ b/juick-server/src/main/java/com/juick/server/CommandsManager.java @@ -466,7 +466,7 @@ public class CommandsManager { tagService.updateTags(mid, messageTags); return CommandResult.fromString("Tags are updated"); } else { - String attachmentType = StringUtils.isNotEmpty(attachment.toString()) ? attachment.toString().substring(attachment.toString().length() - 3) : null; + String attachmentType = attachment != null && StringUtils.isNotEmpty(attachment.toString()) ? attachment.toString().substring(attachment.toString().length() - 3) : null; int newrid = messagesService.createReply(mid, rid, user.getUid(), txt, attachmentType); if (StringUtils.isNotEmpty(attachmentType)) { String attachmentFName = attachment.getScheme().equals("juick") ? attachment.getHost() |