diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d24e7c7..0105dca0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Bugfix: Fixed large timeout durations in moderation buttons overlapping with usernames or other buttons. (#2865, #2921) - Bugfix: Middle mouse click no longer scrolls in not fully populated usercards and splits. (#2933) - Bugfix: Fix bad behavior of the HTML color picker edit when user input is being entered. (#2942) +- Bugfix: Fixed founder badge not being respected by `author.subbed` filter. (#2971) ## 2.3.3 diff --git a/src/controllers/filters/parser/FilterParser.cpp b/src/controllers/filters/parser/FilterParser.cpp index 1922dfb2..d7cd1882 100644 --- a/src/controllers/filters/parser/FilterParser.cpp +++ b/src/controllers/filters/parser/FilterParser.cpp @@ -47,10 +47,20 @@ ContextMap buildContextMap(const MessagePtr &m) watchingChannel->getName().compare( m->channelName, Qt::CaseInsensitive) == 0; - bool subscribed = badges.contains("subscriber"); - int subLength = (subscribed && m->badgeInfos.count("subscriber") != 0) - ? m->badgeInfos.at("subscriber").toInt() - : 0; + bool subscribed = false; + int subLength = 0; + for (const QString &subBadge : {"subscriber", "founder"}) + { + if (!badges.contains(subBadge)) + { + continue; + } + subscribed = true; + if (m->badgeInfos.find(subBadge) != m->badgeInfos.end()) + { + subLength = m->badgeInfos.at(subBadge).toInt(); + } + } return { {"author.badges", std::move(badges)},