aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api/activity/Profile.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/www/api/activity/Profile.java')
-rw-r--r--src/main/java/com/juick/www/api/activity/Profile.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/juick/www/api/activity/Profile.java b/src/main/java/com/juick/www/api/activity/Profile.java
index c87d6118..fb66400d 100644
--- a/src/main/java/com/juick/www/api/activity/Profile.java
+++ b/src/main/java/com/juick/www/api/activity/Profile.java
@@ -142,7 +142,7 @@ public class Profile {
String personUri = uri.path(String.format("/u/%s", userName)).toUriString();
List<Integer> mids = messagesService.getUserBlog(user.getUid(), 0, before);
List<Note> notes = messagesService.getMessages(visitor, mids).stream().map(activityPubManager::makeNote)
- .collect(Collectors.toList());
+ .toList();
OrderedCollectionPage page = new OrderedCollectionPage();
page.setPartOf(uri.replacePath(String.format("/u/%s/blog/toc", userName)).toUriString());
page.setFirst(uri.replacePath(String.format("/u/%s/blog", userName)).toUriString());
@@ -155,7 +155,7 @@ public class Profile {
create.setObject(a);
create.setPublished(a.getPublished());
return create;
- }).collect(Collectors.toList()));
+ }).toList());
int beforeNext = mids.stream().reduce((fst, second) -> second).orElse(0);
if (beforeNext > 0) {
page.setNext(uri.queryParam("before", beforeNext).toUriString());
@@ -200,7 +200,7 @@ public class Profile {
follower.setPreferredUsername(a.getName());
follower.setUrl(profileUriBuilder.personWebUri(a));
return follower;
- }).collect(Collectors.toList()));
+ }).toList());
boolean hasNext = followers.size() <= 20 * page;
if (hasNext) {
result.setNext(uriComponentsBuilder.queryParam("page", page + 1).toUriString());
@@ -244,7 +244,7 @@ public class Profile {
follower.setPreferredUsername(a.getName());
follower.setUrl(profileUriBuilder.personWebUri(a));
return follower;
- }).collect(Collectors.toList()));
+ }).toList());
boolean hasNext = following.size() <= 20 * page;
if (hasNext) {
result.setNext(uriComponentsBuilder.queryParam("page", page + 1).toUriString());