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

use resolveToxID

This commit is contained in:
krepa098 2015-01-03 20:38:06 +01:00
parent d04a79a599
commit 64f7f7c45e

View File

@ -186,7 +186,7 @@ void GenericChatForm::onChatContextMenuRequested(QPoint pos)
ChatMessage* GenericChatForm::addMessage(const ToxID& author, const QString &message, bool isAction,
const QDateTime &datetime, bool isSent)
{
QString authorStr = (author.isMine() ? Core::getInstance()->getUsername() : Core::getInstance()->getPeerName(author));
QString authorStr = author.isMine() ? Core::getInstance()->getUsername() : resolveToxID(author);
ChatMessage* msg = nullptr;
if(isAction)
@ -210,7 +210,7 @@ ChatMessage* GenericChatForm::addSelfMessage(const QString &message, bool isActi
void GenericChatForm::addAlertMessage(const ToxID &author, QString message, QDateTime datetime)
{
QString authorStr = Core::getInstance()->getPeerName(author);
QString authorStr = resolveToxID(author);
chatWidget->addChatMessage(author != previousId ? authorStr : QString(), message, datetime, author.isMine(), true);
previousId = author;