diff --git a/CHANGELOG.md b/CHANGELOG.md index 31f68fe6..02165b25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unversioned +- Minor: Include normally-stripped mention in replies in logs. (#4420) - Minor: Added support for FrankerFaceZ animated emotes. (#4434) - Minor: Added a local backup of the Twitch Badges API in case the request fails. (#4463) - Bugfix: Fixed an issue where animated emotes would render on top of zero-width emotes. (#4314) diff --git a/src/singletons/helper/LoggingChannel.cpp b/src/singletons/helper/LoggingChannel.cpp index 24da8d20..9f10f87c 100644 --- a/src/singletons/helper/LoggingChannel.cpp +++ b/src/singletons/helper/LoggingChannel.cpp @@ -2,6 +2,7 @@ #include "common/QLogging.hpp" #include "messages/Message.hpp" +#include "messages/MessageThread.hpp" #include "singletons/Paths.hpp" #include "singletons/Settings.hpp" @@ -104,7 +105,20 @@ void LoggingChannel::addMessage(MessagePtr message) str.append(now.toString("HH:mm:ss")); str.append("] "); - str.append(message->searchText); + QString messageSearchText = message->searchText; + if ((message->flags.has(MessageFlag::ReplyMessage) && + getSettings()->stripReplyMention) && + !getSettings()->hideReplyContext) + { + qsizetype colonIndex = messageSearchText.indexOf(':'); + if (colonIndex != -1) + { + QString rootMessageChatter = + message->replyThread->root()->loginName; + messageSearchText.insert(colonIndex + 1, " @" + rootMessageChatter); + } + } + str.append(messageSearchText); str.append(endline); this->appendLine(str);