Fix User Card moderation actions not using Helix (#4378)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user