mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
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:
parent
130b23edaf
commit
7b6094909e
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue