Browse Source

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.
reviewable/pr5101/r3
Anthony Bilinski 7 years ago
parent
commit
dfd2de836e
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 2
      src/widget/widget.cpp

2
src/widget/widget.cpp

@ -1212,7 +1212,7 @@ void Widget::onFriendMessageReceived(int friendId, const QString& message, bool @@ -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);
}

Loading…
Cancel
Save