Fixed bug regarding adding new Message to wrong chats
This commit is contained in:
parent
a3f3a9dcbb
commit
349bf9d34f
@ -102,7 +102,7 @@ public final class ChatScene implements Restorable {
|
|||||||
// Listen to received messages
|
// Listen to received messages
|
||||||
eventBus.register(MessageCreationEvent.class, e -> {
|
eventBus.register(MessageCreationEvent.class, e -> {
|
||||||
final var message = e.get();
|
final var message = e.get();
|
||||||
localDB.getChat(message instanceof GroupMessage ? message.getSenderID() : message.getRecipientID()).ifPresent(chat -> {
|
localDB.getChat(message instanceof GroupMessage ? message.getRecipientID() : message.getSenderID()).ifPresent(chat -> {
|
||||||
chat.insert(message);
|
chat.insert(message);
|
||||||
if (chat.equals(currentChat)) {
|
if (chat.equals(currentChat)) {
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user