1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

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.
This commit is contained in:
Anthony Bilinski 2018-04-23 23:20:09 -07:00
parent b38d79e3da
commit dfd2de836e
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -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);
}