Skip to content

Commit

Permalink
fix: /banid and /ban id: performing duplicate bans (#4957)
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada authored Nov 10, 2023
1 parent 423829b commit 244efaa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 0 additions & 11 deletions src/controllers/commands/builtin/twitch/Ban.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 244efaa

Please sign in to comment.