diff options
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r-- | src/main/java/com/juick/server/ActivityPubManager.java | 3 | ||||
-rw-r--r-- | src/main/java/com/juick/server/api/activity/model/Context.java | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/juick/server/ActivityPubManager.java b/src/main/java/com/juick/server/ActivityPubManager.java index a5398325..94a8434e 100644 --- a/src/main/java/com/juick/server/ActivityPubManager.java +++ b/src/main/java/com/juick/server/ActivityPubManager.java @@ -266,7 +266,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene if (MessageUtils.isPM(msg)) { note.setTo(Collections.singletonList(personUri(msg.getTo()))); } else { - note.setTo(Collections.singletonList("https://www.w3.org/ns/activitystreams#Public")); + note.setTo(Collections.singletonList(Context.ACTIVITYSTREAMS_PUBLIC)); note.setCc(Collections.singletonList(followersUri(msg.getUser()))); } note.setPublished(msg.getCreated()); @@ -355,6 +355,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene Announce announce = new Announce(); announce.setId(note.getId() + "#top"); announce.setActor(personUri(serviceUser)); + announce.setTo(Collections.singletonList(Context.ACTIVITYSTREAMS_PUBLIC)); announce.setObject(note); Person me = (Person) signatureManager.getContext(URI.create(announce.getActor())).get(); socialService.getFollowers(serviceUser).forEach(acct -> { diff --git a/src/main/java/com/juick/server/api/activity/model/Context.java b/src/main/java/com/juick/server/api/activity/model/Context.java index 1d3f238c..87e04a89 100644 --- a/src/main/java/com/juick/server/api/activity/model/Context.java +++ b/src/main/java/com/juick/server/api/activity/model/Context.java @@ -75,6 +75,7 @@ public abstract class Context { public final static String LD_JSON_MEDIA_TYPE = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\""; public final static String ACTIVITY_MEDIA_TYPE = "application/activity+json"; public final static String ACTIVITYSTREAMS_PROFILE_MEDIA_TYPE = ACTIVITY_MEDIA_TYPE + "; profile=\"https://www.w3.org/ns/activitystreams\""; + public final static String ACTIVITYSTREAMS_PUBLIC = "https://www.w3.org/ns/activitystreams#Public"; public Instant getPublished() { return published; |