diff options
Diffstat (limited to 'src/main/java/com/juick/ActivityPubManager.java')
-rw-r--r-- | src/main/java/com/juick/ActivityPubManager.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/juick/ActivityPubManager.java b/src/main/java/com/juick/ActivityPubManager.java index 5df89527..621a89c2 100644 --- a/src/main/java/com/juick/ActivityPubManager.java +++ b/src/main/java/com/juick/ActivityPubManager.java @@ -249,7 +249,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene User user = msg.getUser(); String userUri = personUri(user); Note note = makeNote(msg); - Person me = (Person) signatureManager.getContext(URI.create(userUri)).get(); + Actor me = (Actor) signatureManager.getContext(URI.create(userUri)).get(); Set<String> subscribers = new HashSet<>(socialService.getFollowers(user)); if (MessageUtils.isReply(msg) && msg.getTo().getUri().toASCIIString().length() > 0) { String replier = msg.getTo().getUri().toASCIIString(); @@ -261,7 +261,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene subscribers.addAll(note.getCc()); subscribers.forEach(acct -> { Optional<Context> context = signatureManager.getContext(URI.create(acct)); - if (context.isPresent() && context.get() instanceof Person) { + if (context.isPresent() && context.get() instanceof Actor) { Actor follower = (Actor)context.get(); Create create = new Create(); create.setId(note.getId()); @@ -359,7 +359,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene Note activity = (Note) noteContext.get(); Optional<Context> personContext = signatureManager.getContext(URI.create(activity.getAttributedTo())); if (personContext.isPresent()) { - Person person = (Person) personContext.get(); + Actor person = (Actor) personContext.get(); note.getTags().add(new Mention(person.getUrl(), person.getPreferredUsername())); msg.getTo().setName(person.getPreferredUsername()); note.setInReplyTo(activity.getInReplyTo()); @@ -424,8 +424,8 @@ public class ActivityPubManager implements ActivityListener, NotificationListene }, () -> logger.warn("Follower not found: {}", acct)); }); } - public User personToUser(URI uri) throws HttpBadRequestException { - Person person = (Person) signatureManager.getContext(uri).orElseThrow(HttpBadRequestException::new); + public User actorToUser(URI uri) throws HttpBadRequestException { + Actor person = (Actor) signatureManager.getContext(uri).orElseThrow(HttpBadRequestException::new); User user = new User(); user.setUri(URI.create(person.getId())); user.setName(person.getPreferredUsername()); |