mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add searching & filtering for bits (#4069)
This commit is contained in:
parent
62b689e746
commit
dd6cb80ab9
|
@ -19,6 +19,7 @@
|
||||||
- Minor: Clicking `A message from x was deleted` messages will now jump to the message in question. (#3953)
|
- Minor: Clicking `A message from x was deleted` messages will now jump to the message in question. (#3953)
|
||||||
- Minor: Added `is:first-msg` search option. (#3700)
|
- Minor: Added `is:first-msg` search option. (#3700)
|
||||||
- Minor: Added `is:elevated-msg` search option. (#4018)
|
- Minor: Added `is:elevated-msg` search option. (#4018)
|
||||||
|
- Minor: Added `is:cheer-msg` search option. (#4069)
|
||||||
- Minor: Added `subtier:` search option (e.g. `subtier:3` to find Tier 3 subs). (#4013)
|
- 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 `badge:` search option (e.g. `badge:mod` to users with the moderator badge). (#4013)
|
||||||
- Minor: Added AutoMod message flag filter. (#3938)
|
- Minor: Added AutoMod message flag filter. (#3938)
|
||||||
|
@ -129,6 +130,7 @@
|
||||||
- Minor: Strip leading @ and trailing , from username in `/popout` command. (#3217)
|
- Minor: Strip leading @ and trailing , from username in `/popout` command. (#3217)
|
||||||
- Minor: Added `flags.reward_message` filter variable (#3231)
|
- Minor: Added `flags.reward_message` filter variable (#3231)
|
||||||
- Minor: Added `flags.elevated_message` filter variable. (#4017)
|
- Minor: Added `flags.elevated_message` filter variable. (#4017)
|
||||||
|
- Minor: Added `flags.cheer_message` filter variable. (#4069)
|
||||||
- Minor: Added chatter count to viewer list popout (#3261)
|
- Minor: Added chatter count to viewer list popout (#3261)
|
||||||
- Minor: Ignore out of bounds check for tiling wms (#3270)
|
- Minor: Ignore out of bounds check for tiling wms (#3270)
|
||||||
- Minor: Add clear cache button to cache settings section (#3277)
|
- Minor: Add clear cache button to cache settings section (#3277)
|
||||||
|
|
|
@ -30,6 +30,7 @@ ContextMap buildContextMap(const MessagePtr &m, chatterino::Channel *channel)
|
||||||
* flags.reward_message
|
* flags.reward_message
|
||||||
* flags.first_message
|
* flags.first_message
|
||||||
* flags.elevated_message
|
* flags.elevated_message
|
||||||
|
* flags.cheer_message
|
||||||
* flags.whisper
|
* flags.whisper
|
||||||
* flags.reply
|
* flags.reply
|
||||||
* flags.automod
|
* flags.automod
|
||||||
|
@ -85,6 +86,7 @@ ContextMap buildContextMap(const MessagePtr &m, chatterino::Channel *channel)
|
||||||
m->flags.has(MessageFlag::RedeemedChannelPointReward)},
|
m->flags.has(MessageFlag::RedeemedChannelPointReward)},
|
||||||
{"flags.first_message", m->flags.has(MessageFlag::FirstMessage)},
|
{"flags.first_message", m->flags.has(MessageFlag::FirstMessage)},
|
||||||
{"flags.elevated_message", m->flags.has(MessageFlag::ElevatedMessage)},
|
{"flags.elevated_message", m->flags.has(MessageFlag::ElevatedMessage)},
|
||||||
|
{"flags.cheer_message", m->flags.has(MessageFlag::CheerMessage)},
|
||||||
{"flags.whisper", m->flags.has(MessageFlag::Whisper)},
|
{"flags.whisper", m->flags.has(MessageFlag::Whisper)},
|
||||||
{"flags.reply", m->flags.has(MessageFlag::ReplyMessage)},
|
{"flags.reply", m->flags.has(MessageFlag::ReplyMessage)},
|
||||||
{"flags.automod", m->flags.has(MessageFlag::AutoMod)},
|
{"flags.automod", m->flags.has(MessageFlag::AutoMod)},
|
||||||
|
|
|
@ -25,6 +25,7 @@ static const QMap<QString, QString> validIdentifiersMap = {
|
||||||
{"flags.reward_message", "channel point reward message?"},
|
{"flags.reward_message", "channel point reward message?"},
|
||||||
{"flags.first_message", "first message?"},
|
{"flags.first_message", "first message?"},
|
||||||
{"flags.elevated_message", "elevated message?"},
|
{"flags.elevated_message", "elevated message?"},
|
||||||
|
{"flags.cheer_message", "cheer message?"},
|
||||||
{"flags.whisper", "whisper message?"},
|
{"flags.whisper", "whisper message?"},
|
||||||
{"flags.reply", "reply message?"},
|
{"flags.reply", "reply message?"},
|
||||||
{"flags.automod", "automod message?"},
|
{"flags.automod", "automod message?"},
|
||||||
|
|
|
@ -44,6 +44,7 @@ enum class MessageFlag : int64_t {
|
||||||
ReplyMessage = (1LL << 24),
|
ReplyMessage = (1LL << 24),
|
||||||
ElevatedMessage = (1LL << 25),
|
ElevatedMessage = (1LL << 25),
|
||||||
ParticipatedThread = (1LL << 26),
|
ParticipatedThread = (1LL << 26),
|
||||||
|
CheerMessage = (1LL << 27),
|
||||||
};
|
};
|
||||||
using MessageFlags = FlagsEnum<MessageFlag>;
|
using MessageFlags = FlagsEnum<MessageFlag>;
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,10 @@ MessageFlagsPredicate::MessageFlagsPredicate(const QString &flags)
|
||||||
{
|
{
|
||||||
this->flags_.set(MessageFlag::ElevatedMessage);
|
this->flags_.set(MessageFlag::ElevatedMessage);
|
||||||
}
|
}
|
||||||
|
else if (flag == "cheer-msg")
|
||||||
|
{
|
||||||
|
this->flags_.set(MessageFlag::CheerMessage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,6 +204,11 @@ MessagePtr TwitchMessageBuilder::build()
|
||||||
this->message().flags.set(MessageFlag::ElevatedMessage);
|
this->message().flags.set(MessageFlag::ElevatedMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->tags.contains("bits"))
|
||||||
|
{
|
||||||
|
this->message().flags.set(MessageFlag::CheerMessage);
|
||||||
|
}
|
||||||
|
|
||||||
// reply threads
|
// reply threads
|
||||||
if (this->thread_)
|
if (this->thread_)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue