mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Respect founder badge in author.subbed
filter (#2971)
This commit is contained in:
parent
cc9d44a0bb
commit
8a0ed79eca
|
@ -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
|
||||
|
||||
|
|
|
@ -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)},
|
||||
|
|
Loading…
Reference in a new issue