fix: /banid and /ban id: performing duplicate bans (#4957)

This commit is contained in:
pajlada 2023-11-10 19:46:28 +01:00 committed by GitHub
parent 423829be43
commit 244efaa0a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 12 deletions

View file

@ -7,7 +7,7 @@
- Minor: The account switcher is now styled to match your theme. (#4817) - 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: 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: 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: 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: 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) - Minor: The `/reply` command now replies to the latest message of the user. (#4919)

View file

@ -163,17 +163,6 @@ QString sendBan(const CommandContext &ctx)
{ {
banUserByID(channel, twitchChannel, currentUser->getUserId(), banUserByID(channel, twitchChannel, currentUser->getUserId(),
targetUserID, reason, targetUserID); 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 else
{ {