From d005bcd4c976eaf4d4aff48a8297bb2e53383fb8 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Mon, 6 Jan 2020 15:00:44 +0200 Subject: [PATCH] Adjusted message creation to the updated MessageBuilder. --- src/main/java/envoy/client/ui/ChatWindow.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/envoy/client/ui/ChatWindow.java b/src/main/java/envoy/client/ui/ChatWindow.java index b839c4c..4f8b0dc 100644 --- a/src/main/java/envoy/client/ui/ChatWindow.java +++ b/src/main/java/envoy/client/ui/ChatWindow.java @@ -247,7 +247,9 @@ public class ChatWindow extends JFrame { if (!messageEnterTextArea.getText().isEmpty()) try { // Create message - final Message message = new MessageBuilder(localDB.getUser(), currentChat.getRecipient()).setText(messageEnterTextArea.getText()).build(); + final Message message = new MessageBuilder(localDB.getUser().getId(), currentChat.getRecipient().getId()) + .setText(messageEnterTextArea.getText()) + .build(); // Send message client.sendMessage(message);