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
2 changed files with 16 additions and 0 deletions
+15
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();