From ee7070c3330c5f5a3d44a37c7758dcf534d5a8ef Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 24 Oct 2018 00:39:13 +0300 Subject: ReplyToUri is Note --- .../src/main/java/com/juick/server/ActivityPubManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server') diff --git a/juick-server/src/main/java/com/juick/server/ActivityPubManager.java b/juick-server/src/main/java/com/juick/server/ActivityPubManager.java index 6cfcf377..a206c47f 100644 --- a/juick-server/src/main/java/com/juick/server/ActivityPubManager.java +++ b/juick-server/src/main/java/com/juick/server/ActivityPubManager.java @@ -223,10 +223,10 @@ public class ActivityPubManager implements ActivityListener, NotificationListene return hashtag; }).collect(Collectors.toList())); if (msg.getReplyToUri() != null && msg.getReplyToUri().toASCIIString().length() > 0) { - Optional createContext = signatureManager.getContext(msg.getReplyToUri()); - if (createContext.isPresent()) { - Create activity = (Create) createContext.get(); - Optional personContext = signatureManager.getContext(URI.create(activity.getActor())); + Optional noteContext = signatureManager.getContext(msg.getReplyToUri()); + if (noteContext.isPresent()) { + Note activity = (Note) noteContext.get(); + Optional personContext = signatureManager.getContext(URI.create(activity.getAttributedTo())); if (personContext.isPresent()) { Person person = (Person) personContext.get(); note.getTags().add(new Mention(person.getUrl(), person.getPreferredUsername())); -- cgit v1.2.3