fixed Problem "private Messages are visible for sender"

#28
This commit is contained in:
schrom01 2022-04-13 17:24:22 +02:00
parent d1dfe6c1ab
commit e69ced4081
1 changed files with 3 additions and 0 deletions

View File

@ -149,6 +149,9 @@ public class ServerConnectionHandler implements Runnable{
ServerConnectionHandler handler = connectionRegistry.get(reciever); ServerConnectionHandler handler = connectionRegistry.get(reciever);
if (handler != null) { if (handler != null) {
handler.sendData(sender, reciever, type, payload); handler.sendData(sender, reciever, type, payload);
if(!reciever.equals(sender)){
sendData(sender, reciever, type, payload);
}
} else { } else {
this.sendData(USER_NONE, userName, DATA_TYPE_ERROR, "Unknown User: " + reciever); this.sendData(USER_NONE, userName, DATA_TYPE_ERROR, "Unknown User: " + reciever);
} }