Update to optimize maintainability of the code

This commit is contained in:
Gregoire Parant 2021-03-11 12:17:37 +01:00
parent 2fcb8a76b1
commit 59c310d0a8

View File

@ -475,7 +475,7 @@ export class SocketManager implements ZoneEventListener {
}
public async emitSendUserMessage(userUuid: string, message: string, type: string, roomId: string) {
const client = this.searchClientByUuid(userUuid);
/*const client = this.searchClientByUuid(userUuid);
if(client) {
const adminMessage = new SendUserMessage();
adminMessage.setMessage(message);
@ -484,7 +484,7 @@ export class SocketManager implements ZoneEventListener {
pusherToBackMessage.setSendusermessage(adminMessage);
client.backConnection.write(pusherToBackMessage);
return;
}
}*/
const backConnection = await apiClientRepository.getClient(roomId);
const backAdminMessage = new AdminMessage();
@ -500,7 +500,7 @@ export class SocketManager implements ZoneEventListener {
}
public async emitBan(userUuid: string, message: string, type: string, roomId: string) {
const client = this.searchClientByUuid(userUuid);
/*const client = this.searchClientByUuid(userUuid);
if(client) {
const banUserMessage = new BanUserMessage();
banUserMessage.setMessage(message);
@ -509,7 +509,7 @@ export class SocketManager implements ZoneEventListener {
pusherToBackMessage.setBanusermessage(banUserMessage);
client.backConnection.write(pusherToBackMessage);
return;
}
}*/
const backConnection = await apiClientRepository.getClient(roomId);
const banMessage = new BanMessage();