From 168f346c81e0760ea2d5049ae154839073c8565b Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Sat, 5 Aug 2023 18:36:49 +0200 Subject: [PATCH] Remove restriction on Go To Message on system messages from search (#4614) * Remove restriction on go to message on system messages Fixes #4608 * changelog * Change the changelog entry from a bugfix to minor --------- Co-authored-by: Rasmus Karlsson --- CHANGELOG.md | 1 + src/widgets/helper/ChannelView.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 686e966a..46f68e3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: Remove restriction on Go To Message on system messages from search. (#4614) - 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) diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp index a1868044..480eb60a 100644 --- a/src/widgets/helper/ChannelView.cpp +++ b/src/widgets/helper/ChannelView.cpp @@ -2678,7 +2678,9 @@ bool ChannelView::mayContainMessage(const MessagePtr &message) case Channel::Type::Twitch: case Channel::Type::TwitchWatching: case Channel::Type::Irc: - return this->channel()->getName() == message->channelName; + // XXX: system messages may not have the channel set + return message->flags.has(MessageFlag::System) || + this->channel()->getName() == message->channelName; case Channel::Type::TwitchWhispers: return message->flags.has(MessageFlag::Whisper); case Channel::Type::TwitchMentions: