aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-02-04 05:41:24 +0300
committerGravatar Vitaly Takmazov2023-02-04 05:41:24 +0300
commit20220a008dbf92e06d9d6f7e9aaaac31343b701e (patch)
treea5be508a1be1154da05fd7bac3149e2bcc3c8ab7 /src
parent274e295ef4ed6b50718d9d8a957e7b239b3bd12d (diff)
Do not try to subscribe to already subscribed message
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/juick/CommandsManager.java2
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);