Update to optimize maintainability of the code
This commit is contained in:
parent
2fcb8a76b1
commit
59c310d0a8
@ -475,7 +475,7 @@ export class SocketManager implements ZoneEventListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async emitSendUserMessage(userUuid: string, message: string, type: string, roomId: string) {
|
public async emitSendUserMessage(userUuid: string, message: string, type: string, roomId: string) {
|
||||||
const client = this.searchClientByUuid(userUuid);
|
/*const client = this.searchClientByUuid(userUuid);
|
||||||
if(client) {
|
if(client) {
|
||||||
const adminMessage = new SendUserMessage();
|
const adminMessage = new SendUserMessage();
|
||||||
adminMessage.setMessage(message);
|
adminMessage.setMessage(message);
|
||||||
@ -484,7 +484,7 @@ export class SocketManager implements ZoneEventListener {
|
|||||||
pusherToBackMessage.setSendusermessage(adminMessage);
|
pusherToBackMessage.setSendusermessage(adminMessage);
|
||||||
client.backConnection.write(pusherToBackMessage);
|
client.backConnection.write(pusherToBackMessage);
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
const backConnection = await apiClientRepository.getClient(roomId);
|
const backConnection = await apiClientRepository.getClient(roomId);
|
||||||
const backAdminMessage = new AdminMessage();
|
const backAdminMessage = new AdminMessage();
|
||||||
@ -500,7 +500,7 @@ export class SocketManager implements ZoneEventListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async emitBan(userUuid: string, message: string, type: string, roomId: string) {
|
public async emitBan(userUuid: string, message: string, type: string, roomId: string) {
|
||||||
const client = this.searchClientByUuid(userUuid);
|
/*const client = this.searchClientByUuid(userUuid);
|
||||||
if(client) {
|
if(client) {
|
||||||
const banUserMessage = new BanUserMessage();
|
const banUserMessage = new BanUserMessage();
|
||||||
banUserMessage.setMessage(message);
|
banUserMessage.setMessage(message);
|
||||||
@ -509,7 +509,7 @@ export class SocketManager implements ZoneEventListener {
|
|||||||
pusherToBackMessage.setBanusermessage(banUserMessage);
|
pusherToBackMessage.setBanusermessage(banUserMessage);
|
||||||
client.backConnection.write(pusherToBackMessage);
|
client.backConnection.write(pusherToBackMessage);
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
const backConnection = await apiClientRepository.getClient(roomId);
|
const backConnection = await apiClientRepository.getClient(roomId);
|
||||||
const banMessage = new BanMessage();
|
const banMessage = new BanMessage();
|
||||||
|
Loading…
Reference in New Issue
Block a user