Skip to content

Commit d50e7e1

Browse files
committed
Fix a bug where the "Bypass Duplicate Message Check" setting is ignored
1 parent 2365f25 commit d50e7e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/site/twitch.tv/modules/chat-input/ChatSpam.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { UNICODE_TAG_0, UNICODE_TAG_0_REGEX } from "@/common/Constant";
2222
import type { HookedInstance } from "@/common/ReactHooks";
2323
import { useFloatScreen } from "@/composable/useFloatContext";
2424
import { getModuleRef } from "@/composable/useModule";
25+
import { useConfig } from "@/composable/useSettings";
2526
import UiConfirmPrompt from "@/ui/UiConfirmPrompt.vue";
2627
import UiSuperHint from "@/ui/UiSuperHint.vue";
2728
import { offset } from "@floating-ui/core";
@@ -44,9 +45,10 @@ const suggestContainer = useFloatScreen(rootEl, {
4445
});
4546
4647
const alt = refAutoReset(false, 3e4);
48+
const shouldBypassDuplicateCheck = useConfig("chat_input.spam.bypass_duplicate");
4749
let prevMessage = "";
4850
function handleDuplicateMessage(content: string): string {
49-
if (typeof content === "string" && content === prevMessage) {
51+
if (shouldBypassDuplicateCheck.value && typeof content === "string" && content === prevMessage) {
5052
// Remove existing unicode tags
5153
// avoids conflict with other extensions
5254
content = content.replace(UNICODE_TAG_0_REGEX, "");

0 commit comments

Comments
 (0)