From 1e6e18f53aa69335b69bc0adcc555a1a797b5947 Mon Sep 17 00:00:00 2001 From: Felanbird <41973452+Felanbird@users.noreply.github.com> Date: Sun, 6 Nov 2022 06:14:27 -0500 Subject: [PATCH] Add `is:redemption` search predicate (#4118) --- CHANGELOG.md | 1 + src/messages/search/MessageFlagsPredicate.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d004752d8..25c7ed457 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Minor: Added `is:first-msg` search option. (#3700) - Minor: Added `is:elevated-msg` search option. (#4018) - Minor: Added `is:cheer-msg` search option. (#4069) +- Minor: Added `is:redemption` search option. (#4118) - Minor: Added `subtier:` search option (e.g. `subtier:3` to find Tier 3 subs). (#4013) - Minor: Added `badge:` search option (e.g. `badge:mod` to users with the moderator badge). (#4013) - Minor: Added AutoMod message flag filter. (#3938) diff --git a/src/messages/search/MessageFlagsPredicate.cpp b/src/messages/search/MessageFlagsPredicate.cpp index 3221da236..a659d6347 100644 --- a/src/messages/search/MessageFlagsPredicate.cpp +++ b/src/messages/search/MessageFlagsPredicate.cpp @@ -42,6 +42,11 @@ MessageFlagsPredicate::MessageFlagsPredicate(const QString &flags) { this->flags_.set(MessageFlag::CheerMessage); } + else if (flag == "redemption") + { + this->flags_.set(MessageFlag::RedeemedChannelPointReward); + this->flags_.set(MessageFlag::RedeemedHighlight); + } } }