From dfd2de836eae605e02a1afb270620dd9274f6385 Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Mon, 23 Apr 2018 23:20:09 -0700 Subject: [PATCH] fix(history): don't save both action prefix and displayed name Displayed name is already added to action messages when added to ChatForm. Saving in history as well results in the display name being displayed twice when loaded from history. --- src/widget/widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 134902921..000d363ab 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -1212,7 +1212,7 @@ void Widget::onFriendMessageReceived(int friendId, const QString& message, bool QString name = f->getDisplayedName(); QString text = message; if (isAction) { - text = ChatForm::ACTION_PREFIX + f->getDisplayedName() + " " + text; + text = ChatForm::ACTION_PREFIX + text; } profile->getHistory()->addNewMessage(publicKey, text, publicKey, timestamp, true, name); }