Fix User Card moderation actions not using Helix (#4378)

This commit is contained in:
pajlada 2023-02-14 21:59:23 +01:00 committed by GitHub
parent a3189baf94
commit f317d4c99b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 7 deletions

View file

@ -16,6 +16,7 @@
- Minor: Remove sending part of the multipart emoji workaround (#4361)
- Minor: Added crashpad to capture crashes on Windows locally. See PR for build/crash analysis instructions. (#4351)
- Minor: Added channel name to /mentions log entries (#4371)
- Bugfix: Fixed User Card moderation actions not working after Twitch IRC chat command deprecation. (#4378)
- 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)

View file

@ -5,6 +5,7 @@
#include "common/NetworkRequest.hpp"
#include "common/QLogging.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "controllers/commands/CommandController.hpp"
#include "controllers/highlights/HighlightBlacklistUser.hpp"
#include "controllers/hotkeys/HotkeyController.hpp"
#include "messages/Message.hpp"
@ -223,6 +224,10 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent,
.arg(this->userName_)
.arg(calculateTimeoutDuration(button));
}
msg = getApp()->commands->execCommand(
msg, this->underlyingChannel_, false);
this->underlyingChannel_->sendMessage(msg);
return "";
}},
@ -478,25 +483,35 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent,
case TimeoutWidget::Ban: {
if (this->underlyingChannel_)
{
this->underlyingChannel_->sendMessage("/ban " +
this->userName_);
QString value = "/ban " + this->userName_;
value = getApp()->commands->execCommand(
value, this->underlyingChannel_, false);
this->underlyingChannel_->sendMessage(value);
}
}
break;
case TimeoutWidget::Unban: {
if (this->underlyingChannel_)
{
this->underlyingChannel_->sendMessage("/unban " +
this->userName_);
QString value = "/unban " + this->userName_;
value = getApp()->commands->execCommand(
value, this->underlyingChannel_, false);
this->underlyingChannel_->sendMessage(value);
}
}
break;
case TimeoutWidget::Timeout: {
if (this->underlyingChannel_)
{
this->underlyingChannel_->sendMessage(
"/timeout " + this->userName_ + " " +
QString::number(arg));
QString value = "/timeout " + this->userName_ + " " +
QString::number(arg);
value = getApp()->commands->execCommand(
value, this->underlyingChannel_, false);
this->underlyingChannel_->sendMessage(value);
}
}
break;