fix APISocketServer chat broadcast muted check

add banner.png
This commit is contained in:
HF 2022-10-19 00:38:25 +02:00
parent 9a44b3a0cc
commit 7192f31549
3 changed files with 4 additions and 3 deletions

BIN
promotion/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

View File

@ -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;
}

View File

@ -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}`);
}
}