Highlights loaded from message history will now correctly appear in the /mentions channel (#4752)

* added messages in mentions tab if correct predicate is met

* Update CHANGELOG.md

* Apply Felanbird's fix

Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>

---------

Co-authored-by: 2547techno <technowizz2547@gmail.com>
Co-authored-by: 2547techno <109011672+2547techno@users.noreply.github.com>
Co-authored-by: Mm2PL <miau@mail.kotmisia.pl>
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
This commit is contained in:
pajlada 2023-08-05 16:23:40 +02:00 committed by GitHub
parent e13df1f602
commit 1aedd4d668
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -18,6 +18,7 @@
- Minor: 7TV badges now automatically update upon changing. (#4512)
- Minor: Stream status requests are now batched. (#4713)
- Minor: Added `/c2-theme-autoreload` command to automatically reload a custom theme. This is useful for when you're developing your own theme. (#4718)
- Minor: Highlights loaded from message history will now correctly appear in the /mentions tab. (#4475)
- Minor: All channels opened in browser tabs are synced when using the extension for quicker switching between tabs. (#4741)
- Minor: Show channel point redemptions without messages in usercard. (#4557)
- Minor: Allow for customizing the behavior of `Right Click`ing of usernames. (#4622, #4751)

View file

@ -1121,6 +1121,21 @@ void TwitchChannel::loadRecentMessages()
tc->addMessagesAtStart(messages);
tc->loadingRecentMessages_.clear();
std::vector<MessagePtr> msgs;
for (MessagePtr msg : messages)
{
const auto highlighted =
msg->flags.has(MessageFlag::Highlighted);
const auto showInMentions =
msg->flags.has(MessageFlag::ShowInMentions);
if (highlighted && showInMentions)
{
msgs.push_back(msg);
}
}
getApp()->twitch->mentionsChannel->fillInMissingMessages(msgs);
},
[weak]() {
auto shared = weak.lock();