fix: stop blocked terms from showing up more than once (#5789)
This commit is contained in:
@@ -495,12 +495,12 @@ void TwitchIrcServer::initialize()
|
||||
PubSubAutoModQueueMessage::Reason::BlockedTerm)
|
||||
{
|
||||
auto numBlockedTermsMatched =
|
||||
msg.blockedTermsFound.count();
|
||||
msg.blockedTermsFound.size();
|
||||
auto hideBlockedTerms =
|
||||
getSettings()
|
||||
->streamerModeHideBlockedTermText &&
|
||||
getApp()->getStreamerMode()->isEnabled();
|
||||
if (!msg.blockedTermsFound.isEmpty())
|
||||
if (!msg.blockedTermsFound.empty())
|
||||
{
|
||||
if (hideBlockedTerms)
|
||||
{
|
||||
@@ -513,14 +513,16 @@ void TwitchIrcServer::initialize()
|
||||
}
|
||||
else
|
||||
{
|
||||
QStringList blockedTerms(
|
||||
msg.blockedTermsFound.begin(),
|
||||
msg.blockedTermsFound.end());
|
||||
action.reason =
|
||||
u"matches %1 blocked term%2 \"%3\""_s
|
||||
.arg(numBlockedTermsMatched)
|
||||
.arg(numBlockedTermsMatched > 1
|
||||
? u"s"
|
||||
: u"")
|
||||
.arg(msg.blockedTermsFound.join(
|
||||
u"\", \""));
|
||||
.arg(blockedTerms.join(u"\", \""));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user