aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/server/ActivityPubManager.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/juick/server/ActivityPubManager.java b/src/main/java/com/juick/server/ActivityPubManager.java
index 5249f3c99..24cc21234 100644
--- a/src/main/java/com/juick/server/ActivityPubManager.java
+++ b/src/main/java/com/juick/server/ActivityPubManager.java
@@ -182,9 +182,10 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
cc.add(replier);
note.setCc(cc);
}
+ subscribers.addAll(note.getCc());
subscribers.forEach(acct -> {
Optional<Context> context = signatureManager.getContext(URI.create(acct));
- if (context.isPresent()) {
+ if (context.isPresent() && context.get() instanceof Person) {
Person follower = (Person)context.get();
Create create = new Create();
create.setId(note.getId());
@@ -304,7 +305,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
Person person = (Person) personContext.get();
note.getTags().add(new Mention(person.getUrl(), person.getPreferredUsername()));
List<String> cc = new ArrayList<>(note.getCc());
- cc.add(person.getUrl());
+ cc.add(person.getId());
note.setCc(cc);
}
});