aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/ActivityPubManager.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/com/juick/ActivityPubManager.java b/src/main/java/com/juick/ActivityPubManager.java
index b0e77c639..a86fc301b 100644
--- a/src/main/java/com/juick/ActivityPubManager.java
+++ b/src/main/java/com/juick/ActivityPubManager.java
@@ -416,11 +416,15 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
socialService.getFollowers(user).forEach(acct -> {
var follower = signatureManager.getContext(URI.create(acct));
follower.ifPresentOrElse((person) -> {
- try {
- logger.info("{} announcing {} to {}", user.getName(), message.getMid(), acct);
- signatureManager.post((Actor)ctx, (Actor) person, announce);
- } catch (IOException | NoSuchAlgorithmException e) {
- logger.warn("activitypub exception", e);
+ if (person instanceof Actor) {
+ try {
+ logger.info("{} announcing {} to {}", user.getName(), message.getMid(), acct);
+ signatureManager.post((Actor) ctx, (Actor) person, announce);
+ } catch (IOException | NoSuchAlgorithmException e) {
+ logger.warn("activitypub exception", e);
+ }
+ } else {
+ logger.warn("Unhandled context: {}", acct);
}
}, () -> logger.warn("Follower not found: {}", acct));
});