diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/juick/ActivityPubManager.java | 14 |
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 b0e77c63..a86fc301 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)); }); |