From 53ac592cec45e2f2e43219a64c650c90be6b3f3d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 23 Jan 2023 16:34:53 +0300 Subject: ActivityPub: do not send activity back to actor --- src/main/java/com/juick/ActivityPubManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/com/juick/ActivityPubManager.java b/src/main/java/com/juick/ActivityPubManager.java index 90616338..0e062e8f 100644 --- a/src/main/java/com/juick/ActivityPubManager.java +++ b/src/main/java/com/juick/ActivityPubManager.java @@ -254,7 +254,8 @@ public class ActivityPubManager implements ActivityListener, NotificationListene } subscribers.addAll(note.getCc()); subscribers.forEach(acct -> { - if (!acct.equals(profileUriBuilder.followersUri(user))) { + if (!acct.equals(profileUriBuilder.followersUri(user)) + && !acct.equals(me.getId())) { var context = activityPubService.get(URI.create(acct)); context.ifPresentOrElse((follower) -> { if (follower instanceof Actor to) { @@ -398,7 +399,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene } } public Message findMessage(String statusId) throws HttpNotFoundException { - String[]ids = statusId.split("-", 2); + String[] ids = statusId.split("-", 2); try { if (ids.length == 2) { return findMessage(Integer.parseInt(ids[0]), Integer.parseInt(ids[1])); -- cgit v1.2.3