removing chat filters

This commit is contained in:
legop3
2026-01-16 02:52:54 -05:00
parent 972942e497
commit 64a9dd3583
+6 -6
View File
@@ -15,7 +15,7 @@ const rateBuckets = new Map(); // socketId -> [timestamps]
const MAX_HISTORY = 100; const MAX_HISTORY = 100;
const history = []; const history = [];
const PROFANITY_LIST = ['bitch', 'cunt', 'nigger', 'nigga', 'asshole', 'dick']; const PROFANITY_LIST = ['bitch', 'cunt', 'nigger', 'nigga', 'asshole', 'dick', 'faggot', 'fag', 'whore'];
const DUPLICATE_WINDOW_MS = 15000; const DUPLICATE_WINDOW_MS = 15000;
const lastMessageBySocket = new Map(); // socketId -> { text, ts } const lastMessageBySocket = new Map(); // socketId -> { text, ts }
@@ -127,7 +127,7 @@ function handleIncoming({ text, tts } = {}, socket, cb = () => {}) {
cb({ error: 'Slow down' }); cb({ error: 'Slow down' });
return; return;
} }
if (clean.length > 256) { if (clean.length > 150) {
cb({ error: 'Message too long' }); cb({ error: 'Message too long' });
return; return;
} }
@@ -139,10 +139,10 @@ function handleIncoming({ text, tts } = {}, socket, cb = () => {}) {
// cb({ error: 'Duplicate message' }); // cb({ error: 'Duplicate message' });
// return; // return;
// } // }
if (isKeymash(clean)) { // if (isKeymash(clean)) {
cb({ error: 'Message looks like spam' }); // cb({ error: 'Message looks like spam' });
return; // return;
} // }
const roverId = resolveRoverId(socket?.id); const roverId = resolveRoverId(socket?.id);
const ttsOptions = normalizeTtsOptions(tts); const ttsOptions = normalizeTtsOptions(tts);
const message = buildMessage(socket, clean, { fromDiscord: false, roverId, tts: ttsOptions }); const message = buildMessage(socket, clean, { fromDiscord: false, roverId, tts: ttsOptions });