Include reply mention when logging (#4420)
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com> Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Unversioned
|
## Unversioned
|
||||||
|
|
||||||
|
- Minor: Include normally-stripped mention in replies in logs. (#4420)
|
||||||
- Minor: Added support for FrankerFaceZ animated emotes. (#4434)
|
- Minor: Added support for FrankerFaceZ animated emotes. (#4434)
|
||||||
- Minor: Added a local backup of the Twitch Badges API in case the request fails. (#4463)
|
- 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)
|
- Bugfix: Fixed an issue where animated emotes would render on top of zero-width emotes. (#4314)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
#include "messages/Message.hpp"
|
#include "messages/Message.hpp"
|
||||||
|
#include "messages/MessageThread.hpp"
|
||||||
#include "singletons/Paths.hpp"
|
#include "singletons/Paths.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
|
|
||||||
@@ -104,7 +105,20 @@ void LoggingChannel::addMessage(MessagePtr message)
|
|||||||
str.append(now.toString("HH:mm:ss"));
|
str.append(now.toString("HH:mm:ss"));
|
||||||
str.append("] ");
|
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);
|
str.append(endline);
|
||||||
|
|
||||||
this->appendLine(str);
|
this->appendLine(str);
|
||||||
|
|||||||
Reference in New Issue
Block a user