Improve reply popup after thread update (#4923)

Co-authored-by: nerix <nero.9@hotmail.de>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
iProdigy
2023-11-05 08:25:26 -08:00
committed by GitHub
parent 9dd83b040b
commit 5209e47df1
12 changed files with 177 additions and 59 deletions
+11 -2
View File
@@ -132,8 +132,17 @@ void LoggingChannel::addMessage(MessagePtr message)
qsizetype colonIndex = messageText.indexOf(':');
if (colonIndex != -1)
{
QString rootMessageChatter =
message->replyThread->root()->loginName;
QString rootMessageChatter;
if (message->replyParent)
{
rootMessageChatter = message->replyParent->loginName;
}
else
{
// we actually want to use 'reply-parent-user-login' tag here,
// but it's not worth storing just for this edge case
rootMessageChatter = message->replyThread->root()->loginName;
}
messageText.insert(colonIndex + 1, " @" + rootMessageChatter);
}
}