diff options
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() |