aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/ActivityPubManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/ActivityPubManager.java')
-rw-r--r--src/main/java/com/juick/ActivityPubManager.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/juick/ActivityPubManager.java b/src/main/java/com/juick/ActivityPubManager.java
index 4324df11..1fff41fc 100644
--- a/src/main/java/com/juick/ActivityPubManager.java
+++ b/src/main/java/com/juick/ActivityPubManager.java
@@ -161,16 +161,17 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
@Override
public void processUpdateEvent(UpdateEvent event) {
- String objectUri = event.getMessageUri();
+ Message object = event.getMessage();
User user = event.getUser();
Actor me = conversionService.convert(user, Actor.class);
socialService.getFollowers(user).forEach(acct -> {
try {
Actor follower = (Actor) signatureManager.getContext(URI.create(acct)).orElseThrow();
Update update = new Update();
- update.setId(objectUri + "#update");
+ var note = makeNote(object);
+ update.setId(note.getId() + "#update");
update.setActor(me.getId());
- update.setObject(new Context(objectUri));
+ update.setObject(note);
logger.info("Update to follower {}", follower.getId());
signatureManager.post(me, follower, update);
} catch (IOException | NoSuchAlgorithmException e) {