aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/ActivityPubManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-08-22 00:13:02 +0300
committerGravatar Vitaly Takmazov2021-08-22 00:13:02 +0300
commit9100b5bda037fcd1b051b98585744077132320bc (patch)
treefdda04472de22e8f53eafc342a05e31b46cfb15d /src/main/java/com/juick/ActivityPubManager.java
parente5c28b65b5d3ef2e5c98c71f55faa7c60d7864f0 (diff)
Type-safe ActivityStreams deserialization
Diffstat (limited to 'src/main/java/com/juick/ActivityPubManager.java')
-rw-r--r--src/main/java/com/juick/ActivityPubManager.java4
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) {