From c4e8697592556395c9043d53fdf83e602bfb8bbb Mon Sep 17 00:00:00 2001 From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> Date: Fri, 18 Jan 2019 14:11:35 -0500 Subject: [PATCH] chatview: check trust status before hiding add contact button Change-Id: Idd1a3839315129c9ca4507d3e9a1d1079db4cc18 --- callwidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/callwidget.cpp b/callwidget.cpp index 1f55e33..31ccd38 100644 --- a/callwidget.cpp +++ b/callwidget.cpp @@ -839,8 +839,10 @@ CallWidget::setupChatView(const lrc::api::conversation::Info& convInfo) auto& accountInfo = LRCInstance::accountModel().getAccountInfo(selectedAccountId); bool isRINGAccount = accountInfo.profileInfo.type == lrc::api::profile::Type::RING; try { - accountInfo.contactModel->getContact(contactURI.toStdString()); - isContact = true; + auto contactInfo = accountInfo.contactModel->getContact(contactURI.toStdString()); + if (contactInfo.isTrusted) { + isContact = true; + } } catch (...) {} ui->imNameLabel->setText(QString(tr("%1", "%1 is the contact username")) -- GitLab