nit: fix some eventsub mini things (#5895)

This commit is contained in:
pajlada
2025-02-02 17:51:46 +01:00
committed by GitHub
parent 0f8a29fdb9
commit da0a247f16
10 changed files with 7 additions and 113 deletions
@@ -9,7 +9,6 @@
#include "messages/Message.hpp"
#include "messages/MessageBuilder.hpp"
#include "messages/MessageElement.hpp"
#include "providers/twitch/eventsub/Controller.hpp"
#include "providers/twitch/PubSubActions.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"
@@ -190,57 +189,4 @@ QString debugTest(const CommandContext &ctx)
return "";
}
QString debugEventSub(const CommandContext &ctx)
{
(void)ctx;
if (ctx.twitchChannel == nullptr)
{
return "";
}
// purposefully subscribe multiple times to ensure we can't sub too many times
// or create too many connections
static eventsub::SubscriptionHandle handle1;
handle1 = getApp()->getEventSub()->subscribe(eventsub::SubscriptionRequest{
.subscriptionType = "channel.ban",
.subscriptionVersion = "1",
.conditions =
{
{
"broadcaster_user_id",
ctx.twitchChannel->roomId(),
},
},
});
auto handle2 =
getApp()->getEventSub()->subscribe(eventsub::SubscriptionRequest{
.subscriptionType = "channel.ban",
.subscriptionVersion = "1",
.conditions =
{
{
"broadcaster_user_id",
ctx.twitchChannel->roomId(),
},
},
});
auto handle3 =
getApp()->getEventSub()->subscribe(eventsub::SubscriptionRequest{
.subscriptionType = "channel.ban",
.subscriptionVersion = "1",
.conditions =
{
{
"broadcaster_user_id",
ctx.twitchChannel->roomId(),
},
},
});
return "";
}
} // namespace chatterino::commands