Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(core): if your username is empty, use toxPK instead in groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Monsterovich committed Jan 5, 2019
1 parent 066bdc5 commit 72bcc6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/widget/form/genericchatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ ChatMessage::Ptr GenericChatForm::createMessage(const ToxPk& author, const QStri
{
const Core* core = Core::getInstance();
bool isSelf = author == core->getSelfId().getPublicKey();
QString authorStr = isSelf ? core->getUsername() : resolveToxPk(author);
QString myNickName = core->getUsername().isEmpty() ? author.toString() : core->getUsername();
QString authorStr = isSelf ? myNickName : resolveToxPk(author);
if (getLatestDate() != QDate::currentDate()) {
addSystemDateMessage();
}
Expand Down

0 comments on commit 72bcc6a

Please sign in to comment.