aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/CommandsManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-30 14:30:46 +0300
committerGravatar Vitaly Takmazov2018-03-30 14:30:46 +0300
commitf11443579c2ccedaf5949cf718183c7c564098ad (patch)
tree8bc8af46a96d1f0b0315ed96106980bcd04b8dea /juick-server/src/main/java/com/juick/server/CommandsManager.java
parent4a9a81c3f2e24752bc8e74e8cd66079a15e0bf76 (diff)
server: fix exception
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.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()