refactor: trim down PubSub implementation (#6158)
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include "messages/Message.hpp"
|
||||
#include "messages/MessageBuilder.hpp"
|
||||
#include "messages/MessageElement.hpp"
|
||||
#include "providers/twitch/PubSubActions.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||
#include "singletons/Theme.hpp"
|
||||
@@ -149,27 +148,7 @@ QString debugTest(const CommandContext &ctx)
|
||||
|
||||
const auto command = ctx.words.value(1);
|
||||
|
||||
if (command == "timeout-pubsub")
|
||||
{
|
||||
QJsonObject data;
|
||||
data["created_by_user_id"] = ctx.twitchChannel->roomId();
|
||||
data["created_by"] = ctx.twitchChannel->getName();
|
||||
|
||||
BanAction action(data, ctx.twitchChannel->roomId());
|
||||
|
||||
action.source.id = ctx.twitchChannel->roomId();
|
||||
action.source.login = ctx.twitchChannel->getName();
|
||||
|
||||
action.target.id = "11148817";
|
||||
action.target.login = "pajlada";
|
||||
action.duration = 10;
|
||||
|
||||
MessageBuilder msg(action, QDateTime::currentDateTime());
|
||||
msg->flags.set(MessageFlag::PubSub);
|
||||
ctx.channel->addOrReplaceTimeout(msg.release(),
|
||||
QDateTime::currentDateTime());
|
||||
}
|
||||
else if (command == "timeout-irc")
|
||||
if (command == "timeout-irc")
|
||||
{
|
||||
auto nowMillis = QDateTime::currentDateTime().toSecsSinceEpoch();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user