From 36e49df53a4d79bf4dc8e5594fc319d641b461c8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 2 Oct 2019 12:53:23 +0300 Subject: Fetch external user data before reply event --- src/main/java/com/juick/server/api/activity/Profile.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/main/java/com/juick/server/api/activity') diff --git a/src/main/java/com/juick/server/api/activity/Profile.java b/src/main/java/com/juick/server/api/activity/Profile.java index 0f258770..77945d6b 100644 --- a/src/main/java/com/juick/server/api/activity/Profile.java +++ b/src/main/java/com/juick/server/api/activity/Profile.java @@ -390,13 +390,6 @@ public class Profile { } @PostMapping(value = "/u/", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public User fetchUser(@RequestParam URI uri) { - Person person = (Person) signatureManager.getContext(uri).orElseThrow(HttpBadRequestException::new); - User user = new User(); - user.setUri(URI.create(person.getId())); - user.setName(person.getPreferredUsername()); - if (person.getIcon() != null) { - user.setAvatar(person.getIcon().getUrl()); - } - return user; + return activityPubManager.personToUser(uri); } } -- cgit v1.2.3