Adjusted message creation to the updated MessageBuilder.

This commit is contained in:
Kai S. K. Engelbart 2020-01-06 15:00:44 +02:00
parent 5bbf8c3503
commit 1e4bd12c23

View File

@ -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);