diff options
author | 2018-11-20 19:07:59 +0300 | |
---|---|---|
committer | 2018-11-20 19:07:59 +0300 | |
commit | b6bb0dc8a3391442fad0124baa12799982cd6d8d (patch) | |
tree | 664a6bdbc76cbc2219eb4c67f8aca875d83fccc0 /src/main/java/com/juick/server/api/activity/Profile.java | |
parent | 6d4f8164ac97690a1993981605435cdc6ff097f2 (diff) |
fix api avatar urls
Diffstat (limited to 'src/main/java/com/juick/server/api/activity/Profile.java')
-rw-r--r-- | src/main/java/com/juick/server/api/activity/Profile.java | 6 |
1 files changed, 1 insertions, 5 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 979f6265..d8a8fd90 100644 --- a/src/main/java/com/juick/server/api/activity/Profile.java +++ b/src/main/java/com/juick/server/api/activity/Profile.java @@ -78,8 +78,6 @@ public class Profile { private String domain; @Value("${ap_base_uri:http://localhost:8080/}") private String baseUri; - @Value("${img_url:http://localhost:8080/i/}") - private String baseImagesUri; @Inject private ObjectMapper jsonMapper; @Inject @@ -103,10 +101,8 @@ public class Profile { person.setOutbox(activityPubManager.outboxUri(user)); person.setFollowers(activityPubManager.followersUri(user)); person.setFollowing(activityPubManager.followingUri(user)); - UriComponentsBuilder image = UriComponentsBuilder.fromUriString(baseImagesUri); - image.path(webApp.getAvatarWebPath(user)); Image avatar = new Image(); - avatar.setUrl(image.toUriString()); + avatar.setUrl(webApp.getAvatarUrl(user)); avatar.setMediaType("image/png"); person.setIcon(avatar); return (Person) Context.build(person); |