aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-01-06 04:20:48 +0300
committerGravatar Vitaly Takmazov2023-01-06 04:20:48 +0300
commitbc668ba68f1d7930d507a7193bf124c8d854687e (patch)
tree61588ba48eb3a38ef7cf25d773c87ea11f0ecfca /src/main/java/com/juick/www/api
parentfcde250ec6a519173c53f195ffed1aa139b333f0 (diff)
Mastodon API: exclude visitor from Conversation accounts list
Diffstat (limited to 'src/main/java/com/juick/www/api')
-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());
}
}