From 6380fb5198fbde0a7c52fdeb3c25defe112303a9 Mon Sep 17 00:00:00 2001 From: pajlada Date: Thu, 16 Feb 2023 21:43:37 +0100 Subject: [PATCH] Fix mod, unmod, vip, unvip buttons in User Card (#4387) --- CHANGELOG.md | 1 + src/widgets/dialogs/UserInfoPopup.cpp | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2300e108d..67ad2e061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Minor: Added support for HTTP and Socks5 proxies through environment variables. (#4321) - Minor: Added crashpad to capture crashes on Windows locally. See PR for build/crash analysis instructions. (#4351) - Bugfix: Fixed User Card moderation actions not working after Twitch IRC chat command deprecation. (#4378) +- Bugfix: Fixed User Card broadcaster actions (mod, unmod, vip, unvip) not working after Twitch IRC chat command deprecation. (#4387) - Bugfix: Fixed crash that would occur when performing certain actions after removing all tabs. (#4271) - Bugfix: Fixed highlight sounds not reloading on change properly. (#4194) - Bugfix: Fixed CTRL + C not working in reply thread popups. (#4209) diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp index ed002225a..9c0541d63 100644 --- a/src/widgets/dialogs/UserInfoPopup.cpp +++ b/src/widgets/dialogs/UserInfoPopup.cpp @@ -419,16 +419,28 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent, }); QObject::connect(mod.getElement(), &Button::leftClicked, [this] { - this->underlyingChannel_->sendMessage("/mod " + this->userName_); + QString value = "/mod " + this->userName_; + value = getApp()->commands->execCommand( + value, this->underlyingChannel_, false); + this->underlyingChannel_->sendMessage(value); }); QObject::connect(unmod.getElement(), &Button::leftClicked, [this] { - this->underlyingChannel_->sendMessage("/unmod " + this->userName_); + QString value = "/unmod " + this->userName_; + value = getApp()->commands->execCommand( + value, this->underlyingChannel_, false); + this->underlyingChannel_->sendMessage(value); }); QObject::connect(vip.getElement(), &Button::leftClicked, [this] { - this->underlyingChannel_->sendMessage("/vip " + this->userName_); + QString value = "/vip " + this->userName_; + value = getApp()->commands->execCommand( + value, this->underlyingChannel_, false); + this->underlyingChannel_->sendMessage(value); }); QObject::connect(unvip.getElement(), &Button::leftClicked, [this] { - this->underlyingChannel_->sendMessage("/unvip " + this->userName_); + QString value = "/unvip " + this->userName_; + value = getApp()->commands->execCommand( + value, this->underlyingChannel_, false); + this->underlyingChannel_->sendMessage(value); }); // userstate