diff options
author | Vitaly Takmazov | 2019-10-02 12:53:23 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-10-02 12:53:23 +0300 |
commit | 36e49df53a4d79bf4dc8e5594fc319d641b461c8 (patch) | |
tree | a3e99e749d22a518ca7593390102b6d694f0d950 /src/main/java/com/juick/server/api | |
parent | 51ff8e2d57e196f1ced45887a1cd23e941f32f20 (diff) |
Fetch external user data before reply event
Diffstat (limited to 'src/main/java/com/juick/server/api')
-rw-r--r-- | src/main/java/com/juick/server/api/activity/Profile.java | 9 |
1 files changed, 1 insertions, 8 deletions
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); } } |