Show verification status in memberlist
This commit is contained in:
parent
18ea01e198
commit
9bad584931
8 changed files with 59 additions and 16 deletions
|
|
@ -53,6 +53,7 @@ MemberList::roleNames() const
|
|||
{Mxid, "mxid"},
|
||||
{DisplayName, "displayName"},
|
||||
{AvatarUrl, "avatarUrl"},
|
||||
{Trustlevel, "trustlevel"},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -69,6 +70,17 @@ MemberList::data(const QModelIndex &index, int role) const
|
|||
return m_memberList[index.row()].first.display_name;
|
||||
case AvatarUrl:
|
||||
return m_memberList[index.row()].second;
|
||||
case Trustlevel: {
|
||||
auto stat =
|
||||
cache::verificationStatus(m_memberList[index.row()].first.user_id.toStdString());
|
||||
|
||||
if (!stat)
|
||||
return crypto::Unverified;
|
||||
if (stat->unverified_device_count)
|
||||
return crypto::Unverified;
|
||||
else
|
||||
return stat->user_verified;
|
||||
}
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue