From fb9dcc8efd8add175cd12563125d225ebb8ceeb9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 4 Sep 2021 12:13:21 +0300 Subject: ActivityPub: update Announce id and log messages --- src/main/java/com/juick/ActivityPubManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/ActivityPubManager.java b/src/main/java/com/juick/ActivityPubManager.java index c6f2c3d8..33404596 100644 --- a/src/main/java/com/juick/ActivityPubManager.java +++ b/src/main/java/com/juick/ActivityPubManager.java @@ -404,7 +404,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene private void processLike(User user, Message message) { Note note = makeNote(message); Announce announce = new Announce(); - announce.setId(note.getId() + "#top"); + announce.setId(personUri(user) + "#announce"); announce.setActor(personUri(user)); announce.setTo(Collections.singletonList(Context.ACTIVITYSTREAMS_PUBLIC)); announce.setObject(note); @@ -413,7 +413,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene var follower = signatureManager.getContext(URI.create(acct)); follower.ifPresentOrElse((person) -> { try { - logger.info("Announcing top: {}", message.getMid()); + logger.info("{} announcing {} to {}", user.getName(), message.getMid(), acct); signatureManager.post(me, (Actor)person, announce); } catch (IOException | NoSuchAlgorithmException e) { logger.warn("activitypub exception", e); -- cgit v1.2.3