diff --git a/CHANGELOG-nightly.md b/CHANGELOG-nightly.md index 4634360b..c19732cc 100644 --- a/CHANGELOG-nightly.md +++ b/CHANGELOG-nightly.md @@ -1,3 +1,7 @@ +### 3.1.6.XXXX + +- Fixed "Bypass Duplicate Message Check" setting being ignored (proof of concept) + ### 3.1.6.2000 - Fixed the profile redirection when clicking on a user on the Twitch dashboard diff --git a/src/site/twitch.tv/modules/chat-input/ChatSpam.vue b/src/site/twitch.tv/modules/chat-input/ChatSpam.vue index 047444a1..5a6f3ded 100644 --- a/src/site/twitch.tv/modules/chat-input/ChatSpam.vue +++ b/src/site/twitch.tv/modules/chat-input/ChatSpam.vue @@ -22,6 +22,7 @@ import { UNICODE_TAG_0, UNICODE_TAG_0_REGEX } from "@/common/Constant"; import type { HookedInstance } from "@/common/ReactHooks"; import { useFloatScreen } from "@/composable/useFloatContext"; import { getModuleRef } from "@/composable/useModule"; +import { useConfig } from "@/composable/useSettings"; import UiConfirmPrompt from "@/ui/UiConfirmPrompt.vue"; import UiSuperHint from "@/ui/UiSuperHint.vue"; import { offset } from "@floating-ui/core"; @@ -44,9 +45,10 @@ const suggestContainer = useFloatScreen(rootEl, { }); const alt = refAutoReset(false, 3e4); +const shouldBypassDuplicateCheck = useConfig("chat_input.spam.bypass_duplicate"); let prevMessage = ""; function handleDuplicateMessage(content: string): string { - if (typeof content === "string" && content === prevMessage) { + if (shouldBypassDuplicateCheck.value && typeof content === "string" && content === prevMessage) { // Remove existing unicode tags // avoids conflict with other extensions content = content.replace(UNICODE_TAG_0_REGEX, "");