From 244efaa0a960857977bdfc0a303057d498700e24 Mon Sep 17 00:00:00 2001 From: pajlada Date: Fri, 10 Nov 2023 19:46:28 +0100 Subject: [PATCH] fix: /banid and /ban id: performing duplicate bans (#4957) --- CHANGELOG.md | 2 +- src/controllers/commands/builtin/twitch/Ban.cpp | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17ed858d2e3..b47137645e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ - Minor: The account switcher is now styled to match your theme. (#4817) - Minor: Add an invisible resize handle to the bottom of frameless user info popups and reply thread popups. (#4795) - Minor: The installer now checks for the VC Runtime version and shows more info when it's outdated. (#4847) -- Minor: Allow running `/ban`, `/timeout`, `/unban`, and `/untimeout` on User IDs by using the `id:123` syntax (e.g. `/timeout id:22484632 1m stop winning`). (#4945, #4956) +- Minor: Allow running `/ban`, `/timeout`, `/unban`, and `/untimeout` on User IDs by using the `id:123` syntax (e.g. `/timeout id:22484632 1m stop winning`). (#4945, #4956, #4957) - Minor: The `/usercard` command now accepts user ids. (#4934) - Minor: Add menu actions to reply directly to a message or the original thread root. (#4923) - Minor: The `/reply` command now replies to the latest message of the user. (#4919) diff --git a/src/controllers/commands/builtin/twitch/Ban.cpp b/src/controllers/commands/builtin/twitch/Ban.cpp index 2ecec39b8d0..b2589d79bca 100644 --- a/src/controllers/commands/builtin/twitch/Ban.cpp +++ b/src/controllers/commands/builtin/twitch/Ban.cpp @@ -163,17 +163,6 @@ QString sendBan(const CommandContext &ctx) { banUserByID(channel, twitchChannel, currentUser->getUserId(), targetUserID, reason, targetUserID); - getHelix()->banUser( - twitchChannel->roomId(), currentUser->getUserId(), targetUserID, - std::nullopt, reason, - [] { - // No response for bans, they're emitted over pubsub/IRC instead - }, - [channel, targetUserID{targetUserID}](auto error, auto message) { - auto errorMessage = - formatBanTimeoutError("ban", error, message, targetUserID); - channel->addMessage(makeSystemMessage(errorMessage)); - }); } else {