diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f8c817dcf5..14322dc01af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ - Bugfix: Fixed highlights sometimes not working after changing sound device, or switching users in your operating system. (#4729) - Bugfix: Fixed key bindings not showing in context menus on Mac. (#4722) - Bugfix: Fixed tab completion rarely completing the wrong word. (#4735) +- Bugfix: Fixed an issue where Subscriptions & Announcements that contained ignored phrases would still appear if the Block option was enabled. (#4748) - Dev: Added command to set Qt's logging filter/rules at runtime (`/c2-set-logging-rules`). (#4637) - Dev: Added the ability to see & load custom themes from the Themes directory. No stable promises are made of this feature, changes might be made that breaks custom themes without notice. (#4570) - Dev: Added test cases for emote and tab completion. (#4644) diff --git a/src/providers/twitch/IrcMessageHandler.cpp b/src/providers/twitch/IrcMessageHandler.cpp index a5e81c01cf3..fa3cbaf7bf5 100644 --- a/src/providers/twitch/IrcMessageHandler.cpp +++ b/src/providers/twitch/IrcMessageHandler.cpp @@ -4,6 +4,7 @@ #include "common/Literals.hpp" #include "common/QLogging.hpp" #include "controllers/accounts/AccountController.hpp" +#include "controllers/ignores/IgnoreController.hpp" #include "messages/LimitedQueue.hpp" #include "messages/Link.hpp" #include "messages/Message.hpp" @@ -892,6 +893,16 @@ std::vector IrcMessageHandler::parseUserNoticeMessage( content = parameters[1]; } + if (isIgnoredMessage({ + .message = content, + .twitchUserID = tags.value("user-id").toString(), + .isMod = channel->isMod(), + .isBroadcaster = channel->isBroadcaster(), + })) + { + return {}; + } + if (specialMessageTypes.contains(msgType)) { // Messages are not required, so they might be empty @@ -953,6 +964,17 @@ void IrcMessageHandler::handleUserNoticeMessage(Communi::IrcMessage *message, content = parameters[1]; } + auto chn = server.getChannelOrEmpty(target); + if (isIgnoredMessage({ + .message = content, + .twitchUserID = tags.value("user-id").toString(), + .isMod = chn->isMod(), + .isBroadcaster = chn->isBroadcaster(), + })) + { + return; + } + if (specialMessageTypes.contains(msgType)) { // Messages are not required, so they might be empty