aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main')
-rw-r--r--juick-server/src/main/java/com/juick/server/CommandsManager.java4
1 files changed, 2 insertions, 2 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 ade70dc9..a0904d33 100644
--- a/juick-server/src/main/java/com/juick/server/CommandsManager.java
+++ b/juick-server/src/main/java/com/juick/server/CommandsManager.java
@@ -516,12 +516,12 @@ public class CommandsManager {
attachmentType = attachmentFName.substring(attachmentFName.length() - 3);
}
int newrid = messagesService.createReply(mid, rid, user, txt, attachmentType);
- applicationEventPublisher.publishEvent(
- new MessageReadEvent(this, user, msg));
if (haveAttachment) {
String fname = String.format("%d-%d.%s", mid, newrid, attachmentType);
imagesService.saveImageWithPreviews(attachmentFName, fname);
}
+ applicationEventPublisher.publishEvent(
+ new MessageReadEvent(this, user, msg));
Message original = messagesService.getMessage(mid);
subscriptionService.subscribeMessage(original, user);
Message reply = messagesService.getReply(mid, newrid);