aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api/activity/Profile.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-10 23:37:15 +0300
committerGravatar Vitaly Takmazov2018-09-10 23:37:15 +0300
commita7bd0c5cd2330a84667b9762b4fd2cb35b1c20d4 (patch)
tree6d4a4e395a4e4c211f8372733cf87a431ccdb21d /juick-server/src/main/java/com/juick/server/api/activity/Profile.java
parentda66e1a4e3bd9a9c85d9eee691b31d78f66d6949 (diff)
fix ActivityPub context
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api/activity/Profile.java')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/Profile.java14
1 files changed, 7 insertions, 7 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 89236f03..06735117 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
@@ -63,7 +63,7 @@ public class Profile {
avatar.setUrl(image.toUriString());
avatar.setMediaType("image/png");
person.setIcon(avatar);
- return person;
+ return (Person) ActivityObject.build(person);
}
throw new HttpNotFoundException();
}
@@ -76,7 +76,7 @@ public class Profile {
blog.setId(ServletUriComponentsBuilder.fromCurrentRequestUri().toUriString());
blog.setTotalItems(userService.getStatsMessages(user.getUid()));
blog.setFirst(uriComponentsBuilder.path(String.format("/u/%s/blog", userName)).toUriString());
- return blog;
+ return (OrderedCollection) ActivityObject.build(blog);
}
throw new HttpNotFoundException();
}
@@ -124,7 +124,7 @@ public class Profile {
if (beforeNext > 0) {
page.setNext(uri.queryParam("before", beforeNext).toUriString());
}
- return page;
+ return (OrderedCollectionPage) ActivityObject.build(page);
}
throw new HttpNotFoundException();
}
@@ -137,7 +137,7 @@ public class Profile {
followers.setId(ServletUriComponentsBuilder.fromCurrentRequestUri().toUriString());
followers.setTotalItems(userService.getStatsMyReaders(user.getUid()));
followers.setFirst(uriComponentsBuilder.path(String.format("/u/%s/followers", userName)).toUriString());
- return followers;
+ return (OrderedCollection) ActivityObject.build(followers);
}
throw new HttpNotFoundException();
}
@@ -167,7 +167,7 @@ public class Profile {
if (hasNext) {
result.setNext(uriComponentsBuilder.queryParam("page", page + 1).toUriString());
}
- return result;
+ return (OrderedCollectionPage) ActivityObject.build(result);
}
throw new HttpNotFoundException();
}
@@ -180,7 +180,7 @@ public class Profile {
following.setId(ServletUriComponentsBuilder.fromCurrentRequestUri().toUriString());
following.setTotalItems(userService.getUserFriends(user.getUid()).size());
following.setFirst(uriComponentsBuilder.path(String.format("/u/%s/followers", userName)).toUriString());
- return following;
+ return (OrderedCollection) ActivityObject.build(following);
}
throw new HttpNotFoundException();
}
@@ -210,7 +210,7 @@ public class Profile {
if (hasNext) {
result.setNext(uriComponentsBuilder.queryParam("page", page + 1).toUriString());
}
- return result;
+ return (OrderedCollectionPage) ActivityObject.build(result);
}
throw new HttpNotFoundException();
}