fix userid < 5000 special chat priviledge

This commit is contained in:
HF 2023-06-11 19:17:18 +02:00
parent 5743276ea9
commit 263c89fef5
2 changed files with 6 additions and 6 deletions

View File

@ -424,7 +424,7 @@ export class ChatProvider {
channelId,
id,
user.ipSub,
(id > 5000) ? country : 'nope',
country,
);
if (allowed) {
logger.info(

View File

@ -16,15 +16,15 @@ export async function allowedChat(
ip,
cc,
) {
if (!cc || cc.length !== 2) {
return [0, 0];
}
const mutecKey = `${MUTEC_PREFIX}:${channelId}`;
const muteKey = `${MUTE_PREFIX}:${userId}`;
const isalKey = `${ALLOWED_PREFIX}:${ip}`;
const country = (cc?.length !== 2 || userId < 5000) ? 'nope' : cc;
return client.allowedChat(
mutecKey, muteKey, isalKey,
cc,
mutecKey,
muteKey,
isalKey,
country,
);
}