remove captcha logging to chat again

This commit is contained in:
HF 2022-07-21 09:54:50 +02:00
parent c5cbe94d50
commit 812c70e0da
2 changed files with 3 additions and 11 deletions

View File

@ -130,7 +130,9 @@ export async function checkCaptchaSolution(
logger.info(
`CAPTCHA ${ip} got captcha wrong (${text} instead of ${solution})`,
);
wrongCallback(text, solution);
if (wrongCallback) {
wrongCallback(text, solution);
}
return 2;
}
logger.info(`CAPTCHA ${ip}:${captchaid} timed out`);

View File

@ -8,7 +8,6 @@
import logger from '../../core/logger';
import { checkCaptchaSolution } from '../../data/redis/captcha';
import { getIPFromRequest } from '../../utils/ip';
import chatProvider from '../../core/ChatProvider';
export default async (req, res) => {
const ip = getIPFromRequest(req);
@ -32,15 +31,6 @@ export default async (req, res) => {
ip,
false,
id,
(inpt, solution) => {
chatProvider.broadcastChatMessage(
'info',
// eslint-disable-next-line max-len
`Someone got his captcha wrong and entered ${inpt} instead of ${solution}`,
chatProvider.enChannelId,
chatProvider.infoUserId,
);
},
);
switch (ret) {