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 655ac58f32
commit d005bcd4c9

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