diff options
author | 2018-10-24 19:11:20 +0300 | |
---|---|---|
committer | 2018-10-24 19:11:20 +0300 | |
commit | 5179d2a856172290a1af2a65c2968e3a3122ff8c (patch) | |
tree | 309ad0027ffceaf1f97db3a085e8407ed8813f49 /juick-server/src/main/java/com | |
parent | 2b2b408e0a4937aa417af485ed1d5bcea41e36a6 (diff) |
ActivityPub: fix UOE
Diffstat (limited to 'juick-server/src/main/java/com')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/ActivityPubManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/ActivityPubManager.java b/juick-server/src/main/java/com/juick/server/ActivityPubManager.java index 1ffd376b..41dd52eb 100644 --- a/juick-server/src/main/java/com/juick/server/ActivityPubManager.java +++ b/juick-server/src/main/java/com/juick/server/ActivityPubManager.java @@ -31,9 +31,11 @@ import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.net.URI; +import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; @@ -139,7 +141,9 @@ public class ActivityPubManager implements ActivityListener, NotificationListene if (MessageUtils.isReply(msg) && msg.getTo().getUri().toASCIIString().length() > 0) { String replier = msg.getTo().getUri().toASCIIString(); subscribers.add(replier); - note.getCc().add(replier); + List<String> cc = new ArrayList<>(note.getCc()); + cc.add(replier); + note.setCc(cc); } subscribers.forEach(acct -> { Optional<Context> context = signatureManager.getContext(URI.create(acct)); |