refactor: trim down PubSub implementation (#6158)

This commit is contained in:
nerix
2025-04-19 14:31:22 +02:00
committed by GitHub
parent 52067d0af7
commit 9d557146b4
24 changed files with 20 additions and 3014 deletions
@@ -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();