aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/juick/CommandsManager.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/com/juick/CommandsManager.java b/src/main/java/com/juick/CommandsManager.java
index 66a45f9d..3795e2b6 100644
--- a/src/main/java/com/juick/CommandsManager.java
+++ b/src/main/java/com/juick/CommandsManager.java
@@ -138,7 +138,9 @@ public class CommandsManager {
}
Message msg = messagesService.getMessage(mid).orElseThrow(IllegalStateException::new);
msg.getUser().setAvatar(webApp.getAvatarUrl(msg.getUser()));
- subscriptionService.subscribeMessage(msg, user);
+ if (!user.isAnonymous()) {
+ subscriptionService.subscribeMessage(msg, user);
+ }
applicationEventPublisher.publishEvent(new SystemEvent(this, SystemActivity.read(user, msg)));
applicationEventPublisher.publishEvent(new SystemEvent(this,
@@ -562,7 +564,9 @@ public class CommandsManager {
applicationEventPublisher.publishEvent(
new SystemEvent(this, SystemActivity.read(user, msg.get())));
Message original = messagesService.getMessage(mid).orElseThrow(IllegalStateException::new);
- subscriptionService.subscribeMessage(original, user);
+ if (!user.isAnonymous()) {
+ subscriptionService.subscribeMessage(original, user);
+ }
Message reply = messagesService.getReply(mid, newrid);
if (reply.getUser().isAnonymous()) {
reply.setUser(activityPubManager.personToUser(reply.getUser().getUri()));