aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/juick/www/api/Mastodon.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/juick/www/api/Mastodon.java b/src/main/java/com/juick/www/api/Mastodon.java
index b23ec9c1..9ea937d1 100644
--- a/src/main/java/com/juick/www/api/Mastodon.java
+++ b/src/main/java/com/juick/www/api/Mastodon.java
@@ -222,18 +222,18 @@ public class Mastodon {
);
}
- public Conversation toConversation(User user, Chat chat) {
+ public Conversation toConversation(Chat chat) {
return new Conversation(
String.valueOf(chat.getUid()),
chat.getUnread() != null && chat.getUnread().size() > 0,
- List.of(toAccount(user), toAccount(chat)),
+ List.of(toAccount(chat)),
mapLastMessage(chat));
}
@GetMapping("/api/v1/conversations")
public List<Conversation> conversations(@ModelAttribute User visitor) {
return chatService.getLastChats(visitor).stream().map(
- chat -> toConversation(visitor, chat)
+ this::toConversation
).collect(Collectors.toList());
}
}