feat(eventsub): don't listen to PubSub if EventSub is on (#6015)

This commit is contained in:
nerix
2025-03-01 23:43:29 +01:00
committed by GitHub
parent 7ad3e50a94
commit 49a6d75180
3 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -31,7 +31,7 @@
- Bugfix: Fixed color input thinking blue is also red. (#5982)
- Bugfix: Fixed an issue where commands would sometimes reset if Chatterino was improperly shut down. (#6011)
- Dev: Subscriptions to PubSub channel points redemption topics now use no auth token, making it continue to work during PubSub shutdown. (#5947)
- Dev: Add initial experimental EventSub support. (#5837, #5895, #5897, #5904, #5910, #5903, #5915, #5916, #5930, #5935, #5932, #5943, #5952, #5953, #5968, #5973, #5974, #5980, #5981, #5985, #5990, #5992, #5993, #5996, #5995, #6000, #6001, #6002, #6003, #6005, #6007, #6010, #6008, #6012, #6013)
- Dev: Add initial experimental EventSub support. (#5837, #5895, #5897, #5904, #5910, #5903, #5915, #5916, #5930, #5935, #5932, #5943, #5952, #5953, #5968, #5973, #5974, #5980, #5981, #5985, #5990, #5992, #5993, #5996, #5995, #6000, #6001, #6002, #6003, #6005, #6007, #6010, #6008, #6012, #6013, #6015)
- Dev: Remove unneeded platform specifier for toasts. (#5914)
- Dev: Highlight checks now use non-capturing groups for the boundaries. (#5784)
- Dev: Removed unused PubSub whisper code. (#5898)
@@ -1,5 +1,7 @@
#pragma once
#include <boost/json.hpp>
#include <cstdint>
namespace chatterino::eventsub::lib::suspicious_users {
+16
View File
@@ -9,6 +9,7 @@
#include "providers/twitch/PubSubHelpers.hpp"
#include "providers/twitch/PubSubMessages.hpp"
#include "providers/twitch/TwitchAccount.hpp"
#include "singletons/Settings.hpp"
#include "util/DebugCount.hpp"
#include "util/Helpers.hpp"
#include "util/RapidjsonHelpers.hpp"
@@ -618,6 +619,11 @@ void PubSub::stop()
void PubSub::listenToChannelModerationActions(const QString &channelID)
{
if (getSettings()->enableExperimentalEventSub)
{
return;
}
if (this->userID_.isEmpty())
{
qCDebug(chatterinoPubSub) << "Unable to listen to moderation actions "
@@ -647,6 +653,11 @@ void PubSub::unlistenChannelModerationActions()
void PubSub::listenToAutomod(const QString &channelID)
{
if (getSettings()->enableExperimentalEventSub)
{
return;
}
if (this->userID_.isEmpty())
{
qCDebug(chatterinoPubSub)
@@ -676,6 +687,11 @@ void PubSub::unlistenAutomod()
void PubSub::listenToLowTrustUsers(const QString &channelID)
{
if (getSettings()->enableExperimentalEventSub)
{
return;
}
if (this->userID_.isEmpty())
{
qCDebug(chatterinoPubSub)