fix(LSTP): LSTP sur un salon renvoyait tous les posts depuis une date sans prendre en compte "select"

This commit is contained in:
Emi Boucly 2025-01-24 09:46:37 +01:00
parent 136054f07e
commit 76764860c9
4 changed files with 48 additions and 30 deletions

View file

@ -319,7 +319,9 @@ public class ChatServer {
} else if (user.getCurrentRoom().equals(content.getString("select"))) {
System.out.println("#");
for (Post post: postVector.getPostsSince(content.getLong("since"))) {
sendEventToContact(contactMap.getContact(user.getLogin()), new Event(Event.POST, post.toJsonObject()));
if (post.getTo().equals(content.getString("select"))) {
sendEventToContact(contactMap.getContact(user.getLogin()), new Event(Event.POST, post.toJsonObject()));
}
}
}
}