feat: add badges, emotes, and filters for suspicious messages (#5060)
* feat: show chat badges on suspicious user messages * feat: display emotes in suspicious user messages * feat: add search filters for suspicious messages * chore: update changelog * refactor: resolve initial nits * fix: finish adding new filter identifier * Comment the new message flags * Add a list of known issues to low trust update messages * fix: Keep shared-pointerness of the channel Without this change, we would have the possibility of using the TwitchChannel after the Channel itself has gone out of scope, albeit not realistically since we just post this to a thread and parse it - there's no networking or big delays involved. but this shows the intent better --------- Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -53,6 +53,10 @@ enum class MessageFlag : int64_t {
|
||||
/// The message caught by AutoMod containing the user who sent the message & its contents
|
||||
AutoModOffendingMessage = (1LL << 31),
|
||||
LowTrustUsers = (1LL << 32),
|
||||
/// The message is sent by a user marked as restricted with Twitch's "Low Trust"/"Suspicious User" feature
|
||||
RestrictedMessage = (1LL << 33),
|
||||
/// The message is sent by a user marked as monitor with Twitch's "Low Trust"/"Suspicious User" feature
|
||||
MonitoredMessage = (1LL << 34),
|
||||
};
|
||||
using MessageFlags = FlagsEnum<MessageFlag>;
|
||||
|
||||
|
||||
@@ -52,6 +52,14 @@ MessageFlagsPredicate::MessageFlagsPredicate(const QString &flags, bool negate)
|
||||
{
|
||||
this->flags_.set(MessageFlag::ReplyMessage);
|
||||
}
|
||||
else if (flag == "restricted")
|
||||
{
|
||||
this->flags_.set(MessageFlag::RestrictedMessage);
|
||||
}
|
||||
else if (flag == "monitored")
|
||||
{
|
||||
this->flags_.set(MessageFlag::MonitoredMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user