From b730ab2062091a9e1f0e1d8a5473a764800c1df5 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 19 Sep 2018 21:22:04 +0300 Subject: ActivityStreams: fix followers and following person urls --- .../src/main/java/com/juick/server/api/activity/Profile.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'juick-server') diff --git a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java index 7c86b69e..4f81c4fb 100644 --- a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java +++ b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java @@ -160,9 +160,7 @@ public class Profile { result.setOrderedItems(followersPage.map(a -> { Person follower = new Person(); follower.setName(a.getName()); - Link url = new Link(); - url.setHref(uriComponentsBuilder.replacePath(String.format("/u/%s", a.getName())).toUriString()); - follower.setUrl(url); + follower.setUrl(uriComponentsBuilder.replacePath(String.format("/u/%s", a.getName())).toUriString()); return follower; }).collect(Collectors.toList())); boolean hasNext = followers.size() <= 20 * page; @@ -203,9 +201,7 @@ public class Profile { result.setOrderedItems(followingPage.map(a -> { Person follower = new Person(); follower.setName(a.getName()); - Link url = new Link(); - url.setHref(uriComponentsBuilder.replacePath(String.format("/u/%s", a.getName())).toUriString()); - follower.setUrl(url); + follower.setUrl(uriComponentsBuilder.replacePath(String.format("/u/%s", a.getName())).toUriString()); return follower; }).collect(Collectors.toList())); boolean hasNext = following.size() <= 20 * page; -- cgit v1.2.3