aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-01-23 16:34:53 +0300
committerGravatar Vitaly Takmazov2023-01-23 16:34:53 +0300
commit53ac592cec45e2f2e43219a64c650c90be6b3f3d (patch)
treeb3f07feb49d1fa0adfdd60466daf6326d7b10e41 /src/main/java
parent63fe5e671193ec54e964f6113b65413683005d9f (diff)
ActivityPub: do not send activity back to actor
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/ActivityPubManager.java5
1 files changed, 3 insertions, 2 deletions
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]));