aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src')
-rw-r--r--juick-server/src/main/java/com/juick/server/CommandsManager.java2
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 74c443cf..9178dbb9 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 = attachment != null ? attachment.toString().substring(attachment.toString().length() - 3) : null;
+ String attachmentType = 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()