diff options
author | Vitaly Takmazov | 2023-02-04 05:41:24 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-02-04 05:41:24 +0300 |
commit | 20220a008dbf92e06d9d6f7e9aaaac31343b701e (patch) | |
tree | a5be508a1be1154da05fd7bac3149e2bcc3c8ab7 | |
parent | 274e295ef4ed6b50718d9d8a957e7b239b3bd12d (diff) |
Do not try to subscribe to already subscribed message
-rw-r--r-- | src/main/java/com/juick/CommandsManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/juick/CommandsManager.java b/src/main/java/com/juick/CommandsManager.java index 702433e0..6019c7f9 100644 --- a/src/main/java/com/juick/CommandsManager.java +++ b/src/main/java/com/juick/CommandsManager.java @@ -584,7 +584,7 @@ public class CommandsManager { applicationEventPublisher.publishEvent( new SystemEvent(this, SystemActivity.read(user, msg.get()))); Message original = messagesService.getMessage(mid).orElseThrow(IllegalStateException::new); - if (!user.isAnonymous()) { + if (!user.isAnonymous() && !original.isSubscribed()) { subscriptionService.subscribeMessage(original, user); } Message reply = messagesService.getReply(mid, newrid); |