From 9e722d05e9c5ffc64cdfd1ccbc5d8c96875ba4c2 Mon Sep 17 00:00:00 2001 From: Felanbird <41973452+Felanbird@users.noreply.github.com> Date: Sat, 1 Oct 2022 06:27:25 -0400 Subject: [PATCH] Add `flags.elevated_message` filter variable (#4017) --- CHANGELOG.md | 1 + src/controllers/filters/parser/FilterParser.cpp | 2 ++ src/controllers/filters/parser/Tokenizer.hpp | 1 + 3 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cca3b0935..78a379317 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,6 +98,7 @@ - Minor: Fixed `/streamlink` command not stripping leading @'s or #'s (#3215) - Minor: Strip leading @ and trailing , from username in `/popout` command. (#3217) - Minor: Added `flags.reward_message` filter variable (#3231) +- Minor: Added `flags.elevated_message` filter variable. (#4017) - Minor: Added chatter count to viewer list popout (#3261) - Minor: Ignore out of bounds check for tiling wms (#3270) - Minor: Add clear cache button to cache settings section (#3277) diff --git a/src/controllers/filters/parser/FilterParser.cpp b/src/controllers/filters/parser/FilterParser.cpp index 104192641..6b74900c1 100644 --- a/src/controllers/filters/parser/FilterParser.cpp +++ b/src/controllers/filters/parser/FilterParser.cpp @@ -29,6 +29,7 @@ ContextMap buildContextMap(const MessagePtr &m, chatterino::Channel *channel) * flags.system_message * flags.reward_message * flags.first_message + * flags.elevated_message * flags.whisper * flags.reply * flags.automod @@ -83,6 +84,7 @@ ContextMap buildContextMap(const MessagePtr &m, chatterino::Channel *channel) {"flags.reward_message", m->flags.has(MessageFlag::RedeemedChannelPointReward)}, {"flags.first_message", m->flags.has(MessageFlag::FirstMessage)}, + {"flags.elevated_message", m->flags.has(MessageFlag::ElevatedMessage)}, {"flags.whisper", m->flags.has(MessageFlag::Whisper)}, {"flags.reply", m->flags.has(MessageFlag::ReplyMessage)}, {"flags.automod", m->flags.has(MessageFlag::AutoMod)}, diff --git a/src/controllers/filters/parser/Tokenizer.hpp b/src/controllers/filters/parser/Tokenizer.hpp index 4e5a6798d..d0297545f 100644 --- a/src/controllers/filters/parser/Tokenizer.hpp +++ b/src/controllers/filters/parser/Tokenizer.hpp @@ -24,6 +24,7 @@ static const QMap validIdentifiersMap = { {"flags.system_message", "system message?"}, {"flags.reward_message", "channel point reward message?"}, {"flags.first_message", "first message?"}, + {"flags.elevated_message", "elevated message?"}, {"flags.whisper", "whisper message?"}, {"flags.reply", "reply message?"}, {"flags.automod", "automod message?"},