fix APISocketServer chat broadcast muted check
add banner.png
This commit is contained in:
parent
9a44b3a0cc
commit
7192f31549
Binary file not shown.
After Width: | Height: | Size: 245 KiB |
|
@ -11,12 +11,13 @@ import WebSocket from 'ws';
|
|||
|
||||
import socketEvents from './socketEvents';
|
||||
import { dehydrateOnlineCounter } from './packets/server';
|
||||
import chatProvider, { ChatProvider } from '../core/ChatProvider';
|
||||
import chatProvider from '../core/ChatProvider';
|
||||
import { RegUser } from '../data/sql';
|
||||
import { getIPFromRequest } from '../utils/ip';
|
||||
import { setPixelByCoords } from '../core/setPixel';
|
||||
import logger from '../core/logger';
|
||||
import { APISOCKET_KEY } from '../core/config';
|
||||
import { checkIfMuted } from '../data/redis/chat';
|
||||
|
||||
|
||||
class APISocketServer {
|
||||
|
@ -243,7 +244,7 @@ class APISocketServer {
|
|||
/*
|
||||
* don't send if muted
|
||||
*/
|
||||
const mutedTtl = await ChatProvider.checkIfMuted(uid);
|
||||
const mutedTtl = await checkIfMuted(uid);
|
||||
if (mutedTtl !== -2) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -481,7 +481,7 @@ class SocketServer {
|
|||
}
|
||||
} catch (err) {
|
||||
// eslint-disable-next-line max-len
|
||||
logger.error(`Got invalid ws text message ${text}, with error: ${err.message}`);
|
||||
logger.error(`Got invalid ws text message ${text} from ${ws.user.ip}, with error: ${err.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue