Add AutoMod message flag filter (#3938)

This commit is contained in:
pajlada 2022-08-28 13:31:53 +02:00 committed by GitHub
parent c1af2c3faa
commit dcd42cb28b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View file

@ -28,6 +28,7 @@
- Minor: Warn when parsing an environment variable fails. (#3904)
- Minor: Load missing messages from Recent Messages API upon reconnecting (#3878, #3932)
- Minor: Add settings to toggle BTTV/FFZ global/channel emotes (#3935)
- Minor: Add AutoMod message flag filter. (#3938)
- Bugfix: Fix crash that can occur when closing and quickly reopening a split, then running a command. (#3852)
- Bugfix: Connection to Twitch PubSub now recovers more reliably. (#3643, #3716)
- Bugfix: Fix crash that can occur when changing channels. (#3799)

View file

@ -30,6 +30,8 @@ ContextMap buildContextMap(const MessagePtr &m, chatterino::Channel *channel)
* flags.reward_message
* flags.first_message
* flags.whisper
* flags.reply
* flags.automod
*
* message.content
* message.length
@ -83,6 +85,7 @@ ContextMap buildContextMap(const MessagePtr &m, chatterino::Channel *channel)
{"flags.first_message", m->flags.has(MessageFlag::FirstMessage)},
{"flags.whisper", m->flags.has(MessageFlag::Whisper)},
{"flags.reply", m->flags.has(MessageFlag::ReplyMessage)},
{"flags.automod", m->flags.has(MessageFlag::AutoMod)},
{"message.content", m->messageText},
{"message.length", m->messageText.length()},

View file

@ -26,6 +26,7 @@ static const QMap<QString, QString> validIdentifiersMap = {
{"flags.first_message", "first message?"},
{"flags.whisper", "whisper message?"},
{"flags.reply", "reply message?"},
{"flags.automod", "automod message?"},
{"message.content", "message text"},
{"message.length", "message length"}};