diff options
author | Vitaly Takmazov | 2021-08-22 00:13:02 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-08-22 00:13:02 +0300 |
commit | 9100b5bda037fcd1b051b98585744077132320bc (patch) | |
tree | fdda04472de22e8f53eafc342a05e31b46cfb15d /src/main/java/com/juick/ActivityPubManager.java | |
parent | e5c28b65b5d3ef2e5c98c71f55faa7c60d7864f0 (diff) |
Type-safe ActivityStreams deserialization
Diffstat (limited to 'src/main/java/com/juick/ActivityPubManager.java')
-rw-r--r-- | src/main/java/com/juick/ActivityPubManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/ActivityPubManager.java b/src/main/java/com/juick/ActivityPubManager.java index 8aa2ef78..cb4d0b54 100644 --- a/src/main/java/com/juick/ActivityPubManager.java +++ b/src/main/java/com/juick/ActivityPubManager.java @@ -92,7 +92,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene @Override public void processFollowEvent(@Nonnull FollowEvent followEvent) { - String acct = (String)followEvent.getRequest().getObject(); + String acct = followEvent.getRequest().getObject().getId(); logger.info("received follower request to {}", acct); User followedUser = socialService.getUserByAccountUri(acct); if (!followedUser.isAnonymous()) { @@ -195,7 +195,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene Update update = new Update(); update.setId(objectUri + "#update"); update.setActor(me.getId()); - update.setObject(objectUri); + update.setObject(new Context(objectUri)); logger.info("Update to follower {}", follower.getId()); signatureManager.post(me, follower, update); } catch (NoSuchElementException e) { |