eslint fix
This commit is contained in:
parent
8d1d6fc8dc
commit
565ce6b70b
@ -79,15 +79,20 @@ export class IoSocketController {
|
|||||||
if(message.event === 'user-message') {
|
if(message.event === 'user-message') {
|
||||||
const messageToEmit = (message.message as { message: string, type: string, userUuid: string });
|
const messageToEmit = (message.message as { message: string, type: string, userUuid: string });
|
||||||
switch (message.message.type) {
|
switch (message.message.type) {
|
||||||
case 'ban':
|
case 'ban': {
|
||||||
socketManager.emitSendUserMessage(messageToEmit);
|
socketManager.emitSendUserMessage(messageToEmit);
|
||||||
break;
|
break;
|
||||||
case 'banned':
|
}
|
||||||
|
case 'banned': {
|
||||||
const socketUser = socketManager.emitSendUserMessage(messageToEmit);
|
const socketUser = socketManager.emitSendUserMessage(messageToEmit);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
socketUser.close();
|
socketUser.close();
|
||||||
}, 10000);
|
}, 10000);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch (err) {
|
}catch (err) {
|
||||||
@ -233,7 +238,7 @@ export class IoSocketController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
res.messages.forEach((c: unknown) => {
|
res.messages.forEach((c: unknown) => {
|
||||||
let messageToSend = c as { type: string, message: string };
|
const messageToSend = c as { type: string, message: string };
|
||||||
socketManager.emitSendUserMessage({
|
socketManager.emitSendUserMessage({
|
||||||
userUuid: client.userUuid,
|
userUuid: client.userUuid,
|
||||||
type: messageToSend.type,
|
type: messageToSend.type,
|
||||||
|
Loading…
Reference in New Issue
Block a user