Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG-nightly.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/site/twitch.tv/modules/chat-input/ChatSpam.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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, "");
Expand Down