fix: don't include blocked users in join/part messages (#6181)

This commit is contained in:
pajlada
2025-05-03 11:32:55 +02:00
committed by GitHub
parent 555b921f65
commit e38c64bac3
12 changed files with 98 additions and 34 deletions
+19 -8
View File
@@ -149,16 +149,27 @@ bool isIgnoredMessage(IgnoredMessageParameters &&params)
}
}
if (!params.twitchUserID.isEmpty() &&
getSettings()->enableTwitchBlockedUsers)
if (getSettings()->enableTwitchBlockedUsers)
{
auto sourceUserID = params.twitchUserID;
bool isBlocked = false;
if (!params.twitchUserID.isEmpty())
{
isBlocked = getApp()
->getAccounts()
->twitch.getCurrent()
->blockedUserIds()
.contains(params.twitchUserID);
}
else if (!params.twitchUserLogin.isEmpty())
{
isBlocked = getApp()
->getAccounts()
->twitch.getCurrent()
->blockedUserLogins()
.contains(params.twitchUserLogin);
}
bool isBlocked = getApp()
->getAccounts()
->twitch.getCurrent()
->blockedUserIds()
.contains(sourceUserID);
if (isBlocked)
{
switch (static_cast<ShowIgnoredUsersMessages>(
@@ -15,6 +15,7 @@ struct IgnoredMessageParameters {
QString message;
QString twitchUserID;
QString twitchUserLogin;
bool isMod;
bool isBroadcaster;
};