mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
use resolveToxID
This commit is contained in:
parent
d04a79a599
commit
64f7f7c45e
|
@ -186,7 +186,7 @@ void GenericChatForm::onChatContextMenuRequested(QPoint pos)
|
||||||
ChatMessage* GenericChatForm::addMessage(const ToxID& author, const QString &message, bool isAction,
|
ChatMessage* GenericChatForm::addMessage(const ToxID& author, const QString &message, bool isAction,
|
||||||
const QDateTime &datetime, bool isSent)
|
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;
|
ChatMessage* msg = nullptr;
|
||||||
if(isAction)
|
if(isAction)
|
||||||
|
@ -210,7 +210,7 @@ ChatMessage* GenericChatForm::addSelfMessage(const QString &message, bool isActi
|
||||||
|
|
||||||
void GenericChatForm::addAlertMessage(const ToxID &author, QString message, QDateTime datetime)
|
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);
|
chatWidget->addChatMessage(author != previousId ? authorStr : QString(), message, datetime, author.isMine(), true);
|
||||||
|
|
||||||
previousId = author;
|
previousId = author;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user