From 24e45817a2301a47ab7b4229468a3d4d9ad9b74f Mon Sep 17 00:00:00 2001 From: teknsl <64030674+teknsl@users.noreply.github.com> Date: Sun, 28 Sep 2025 14:21:55 +0200 Subject: [PATCH] dev: correct handling of eventsubs without any account (#6503) --- CHANGELOG.md | 1 + src/providers/twitch/TwitchChannel.cpp | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79123784..bdc522c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Dev: Find Boost's CMake Config file instead of module file. (#6499) - Dev: Fix 32-bit compile in PluginRepl. (#6483) - Dev: Fix the WinGet release workflow. (#6497) +- Dev: Correct handling of eventsubs without any account. (#6503) - Dev: Removed dependency to Qt5 Compatibility module by updating libcommuni. (#6500) ## 2.5.4 diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index 31f71dab..46e298eb 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -1555,6 +1555,20 @@ void TwitchChannel::refreshPubSub() auto currentAccount = getApp()->getAccounts()->twitch.getCurrent(); + getApp()->getTwitchPubSub()->listenToChannelPointRewards(roomId); + + if (currentAccount->isAnon()) + { + this->eventSubChannelModerateHandle.reset(); + this->eventSubAutomodMessageHoldHandle.reset(); + this->eventSubAutomodMessageUpdateHandle.reset(); + this->eventSubSuspiciousUserMessageHandle.reset(); + this->eventSubSuspiciousUserUpdateHandle.reset(); + this->eventSubChannelChatUserMessageHoldHandle.reset(); + this->eventSubChannelChatUserMessageUpdateHandle.reset(); + return; + } + const auto ¤tTwitchUserID = currentAccount->getUserId(); if (this->hasModRights()) @@ -1692,8 +1706,6 @@ void TwitchChannel::refreshPubSub() }, }); } - - getApp()->getTwitchPubSub()->listenToChannelPointRewards(roomId); } void TwitchChannel::refreshChatters()