diff --git a/CHANGELOG.md b/CHANGELOG.md index 096f1209fe9..2a2144b876c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Minor: Remove TwitchEmotes.com attribution and the open/copy options when right-clicking a Twitch Emote. (#2214, #3136) - Minor: Strip leading @ and trailing , from username in /user and /usercard commands. (#3143) - Minor: Display a system message when reloading subscription emotes to match BTTV/FFZ behavior (#3135) +- Minor: Allow resub messages to show in `/mentions` tab (#3148) - Minor: Added a setting to hide similar messages by any user. (#2716) - Minor: Duplicate spaces now count towards the display message length. (#3002) - Bugfix: Restored ability to send duplicate `/me` messages. (#3166) diff --git a/src/messages/SharedMessageBuilder.cpp b/src/messages/SharedMessageBuilder.cpp index cdc8e59f0dd..3af860f9fa9 100644 --- a/src/messages/SharedMessageBuilder.cpp +++ b/src/messages/SharedMessageBuilder.cpp @@ -157,10 +157,6 @@ void SharedMessageBuilder::parseHighlights() this->message().flags.set(MessageFlag::Highlighted); this->message().highlightColor = ColorProvider::instance().color(ColorType::Subscription); - - // This message was a subscription. - // Don't check for any other highlight phrases. - return; } // XXX: Non-common term in SharedMessageBuilder @@ -220,7 +216,10 @@ void SharedMessageBuilder::parseHighlights() << "sent a message"; this->message().flags.set(MessageFlag::Highlighted); - this->message().highlightColor = userHighlight.getColor(); + if (!this->message().flags.has(MessageFlag::Subscription)) + { + this->message().highlightColor = userHighlight.getColor(); + } if (userHighlight.showInMentions()) { @@ -289,7 +288,10 @@ void SharedMessageBuilder::parseHighlights() } this->message().flags.set(MessageFlag::Highlighted); - this->message().highlightColor = highlight.getColor(); + if (!this->message().flags.has(MessageFlag::Subscription)) + { + this->message().highlightColor = highlight.getColor(); + } if (highlight.showInMentions()) { @@ -344,7 +346,11 @@ void SharedMessageBuilder::parseHighlights() if (!badgeHighlightSet) { this->message().flags.set(MessageFlag::Highlighted); - this->message().highlightColor = highlight.getColor(); + if (!this->message().flags.has(MessageFlag::Subscription)) + { + this->message().highlightColor = highlight.getColor(); + } + badgeHighlightSet = true; } diff --git a/src/providers/twitch/IrcMessageHandler.cpp b/src/providers/twitch/IrcMessageHandler.cpp index 0e720d0eed0..a4ce3c51342 100644 --- a/src/providers/twitch/IrcMessageHandler.cpp +++ b/src/providers/twitch/IrcMessageHandler.cpp @@ -313,12 +313,9 @@ void IrcMessageHandler::addMessage(Communi::IrcMessage *_message, const auto highlighted = msg->flags.has(MessageFlag::Highlighted); const auto showInMentions = msg->flags.has(MessageFlag::ShowInMentions); - if (!isSub) + if (highlighted && showInMentions) { - if (highlighted && showInMentions) - { - server.mentionsChannel->addMessage(msg); - } + server.mentionsChannel->addMessage(msg); } chan->addMessage(msg);