From 2fb419b0e7577351af3666e2ad8f56bb3adca6ce Mon Sep 17 00:00:00 2001 From: kske Date: Sat, 1 Feb 2020 10:41:59 +0100 Subject: [PATCH] Fixed receiving messages --- src/main/java/envoy/client/ui/ChatWindow.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/envoy/client/ui/ChatWindow.java b/src/main/java/envoy/client/ui/ChatWindow.java index 30ea1ea..da64632 100644 --- a/src/main/java/envoy/client/ui/ChatWindow.java +++ b/src/main/java/envoy/client/ui/ChatWindow.java @@ -203,7 +203,7 @@ public class ChatWindow extends JFrame { // Listen to received messages EventBus.getInstance().register(MessageCreationEvent.class, (evt) -> { Message message = ((MessageCreationEvent) evt).get(); - localDB.getChats().stream().filter(c -> c.getRecipient().getId() == message.getRecipientId()).findFirst().get().appendMessage(message); + localDB.getChats().stream().filter(c -> c.getRecipient().getId() == message.getSenderId()).findFirst().get().appendMessage(message); revalidate(); repaint(); });