From d6385d656a0af52d9509f76dccce1172b663f2d9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 31 Oct 2018 15:03:57 +0300 Subject: Fix tests --- juick-server/src/main/java/com/juick/server/CommandsManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-server/src/main/java/com/juick') 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); -- cgit v1.2.3