Connection

- Set the `Message`'s from field to the current user
- Log message send
This commit is contained in:
Tristan B. Velloza Kildaire 2023-11-21 13:45:00 +02:00
parent b6c003d808
commit 334a013104
1 changed files with 7 additions and 1 deletions

View File

@ -282,11 +282,14 @@ public class Connection : Thread
{
Message message;
message.setBody(chanMesg.getMessage());
message.setFrom(chanMesg.getFrom());
message.setFrom(this.myUsername);
message.setDestination(to);
logger.dbg("Sending message: ", message);
mesgMan.sendq(message);
}
}
// Unsupported type for server
else
@ -307,6 +310,9 @@ public class Connection : Thread
logger.warn("We have generated err: ", responseCommand);
}
// Ensure a response was created
// assert(responseCommand !is null);
// Generate response
response = new BaseMessage(mType, responseType, responseCommand);