diff --git a/CHANGELOG.md b/CHANGELOG.md index b0fefbc01f5..05634cf7f1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ - Bugfix: Fixed popup windows not persisting between restarts. (#5081) - Bugfix: Fixed splits not retaining their focus after minimizing. (#5080) - Bugfix: Fixed _Copy message_ copying the channel name in global search. (#5106) +- Bugfix: Reply contexts now use the color of the replied-to message. (#5145) - Dev: Run miniaudio in a separate thread, and simplify it to not manage the device ourselves. There's a chance the simplification is a bad idea. (#4978) - Dev: Change clang-format from v14 to v16. (#4929) - Dev: Fixed UTF16 encoding of `modes` file for the installer. (#4791) diff --git a/src/messages/Message.hpp b/src/messages/Message.hpp index 82de23fe674..937309cf771 100644 --- a/src/messages/Message.hpp +++ b/src/messages/Message.hpp @@ -57,6 +57,8 @@ enum class MessageFlag : int64_t { RestrictedMessage = (1LL << 33), /// The message is sent by a user marked as monitor with Twitch's "Low Trust"/"Suspicious User" feature MonitoredMessage = (1LL << 34), + /// The message is an ACTION message (/me) + Action = (1LL << 35), }; using MessageFlags = FlagsEnum; diff --git a/src/messages/SharedMessageBuilder.cpp b/src/messages/SharedMessageBuilder.cpp index 850df978bad..78d8c0a6932 100644 --- a/src/messages/SharedMessageBuilder.cpp +++ b/src/messages/SharedMessageBuilder.cpp @@ -77,6 +77,7 @@ void SharedMessageBuilder::parse() if (this->action_) { this->textColor_ = this->usernameColor_; + this->message().flags.set(MessageFlag::Action); } this->parseUsername(); diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index 4d99241a8ce..5037da5615c 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -896,11 +896,16 @@ void TwitchMessageBuilder::parseThread() threadRoot->usernameColor, FontStyle::ChatMediumSmall) ->setLink({Link::UserInfo, threadRoot->displayName}); + MessageColor color = MessageColor::Text; + if (threadRoot->flags.has(MessageFlag::Action)) + { + color = threadRoot->usernameColor; + } this->emplace( threadRoot->messageText, MessageElementFlags({MessageElementFlag::RepliedMessage, MessageElementFlag::Text}), - this->textColor_, FontStyle::ChatMediumSmall) + color, FontStyle::ChatMediumSmall) ->setLink({Link::ViewThread, this->thread_->rootId()}); } else if (this->tags.find("reply-parent-msg-id") != this->tags.end())