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()