mirror of
https://github.com/Akomry/sae302_applicom.git
synced 2025-12-06 08:43:54 +00:00
fix(LSTP): LSTP sur un salon renvoyait tous les posts depuis une date sans prendre en compte "select"
This commit is contained in:
parent
136054f07e
commit
76764860c9
4 changed files with 48 additions and 30 deletions
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue