aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/ActivityPubManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-12-23 00:23:23 +0300
committerGravatar Vitaly Takmazov2022-12-23 00:23:23 +0300
commit5470e078691099aeb5e3f0599a7c39b991b149ca (patch)
tree8538abdc0e6af4e66cdaf26a6650f1fa6d0de106 /src/main/java/com/juick/ActivityPubManager.java
parenta57278568eb10b843f76ceaa34f0b2ed36acbbb2 (diff)
ActivityPub: send full object on message update
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) {