aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-05 11:44:19 +0300
committerGravatar Vitaly Takmazov2018-09-05 11:44:19 +0300
commit99b4afb859899b18f39b95a01305ec71cbac76eb (patch)
treebdfcf15e7c309e06d2cab2c589fc88c4680d5d3c /juick-server/src/main/java/com/juick
parentbf6dd8390c1419b8fec56f6dcf09822c2cf59b72 (diff)
ActivityStreams: fix outbox links
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/Profile.java7
1 files changed, 3 insertions, 4 deletions
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 d19b1c9ce..772b1beeb 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
@@ -60,7 +60,7 @@ public class Profile {
User visitor = UserUtils.getCurrentUser();
User user = userService.getUserByName(userName);
if (!user.isAnonymous()) {
- ServletUriComponentsBuilder uriComponentsBuilder = ServletUriComponentsBuilder.fromCurrentRequestUri();
+ UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(baseUri);
OrderedCollection blog = new OrderedCollection();
blog.setId(uriComponentsBuilder.toUriString());
blog.setTotalItems(userService.getStatsMessages(user.getUid()));
@@ -78,7 +78,8 @@ public class Profile {
User visitor = UserUtils.getCurrentUser();
User user = userService.getUserByName(userName);
if (!user.isAnonymous()) {
- ServletUriComponentsBuilder uriComponentsBuilder = ServletUriComponentsBuilder.fromCurrentRequestUri();
+ UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(baseUri);
+ uriComponentsBuilder.path(String.format("/u/%s/blog", userName));
List<Integer> mids = messagesService.getUserBlog(user.getUid(), 0, before);
List<Note> notes = messagesService.getMessages(visitor, mids).stream().map(m -> {
Note note = new Note();
@@ -102,8 +103,6 @@ public class Profile {
next.setHref(uriComponentsBuilder.queryParam("before", beforeNext).toUriString());
page.setNext(next);
}
-
- page.setId(uriComponentsBuilder.toUriString());
return page;
}
throw new HttpNotFoundException();