Improve RoomDrawer for direct chats

Don't show irrelevant stuff like the member list, description, alias

BUG: 466895
This commit is contained in:
Tobias Fella
2023-03-05 18:07:33 +01:00
parent 85b40ca536
commit d844945453
7 changed files with 208 additions and 85 deletions

View File

@@ -1913,3 +1913,16 @@ QByteArray NeoChatRoom::roomAcountDataJson(const QString &eventType)
{
return QJsonDocument(accountData(eventType)->fullJson()).toJson();
}
QUrl NeoChatRoom::avatarForMember(NeoChatUser *user) const
{
#ifdef QUOTIENT_07
return connection()->makeMediaUrl(memberAvatarUrl(user->id()));
#else
QUrl url(QStringLiteral("mxc://%1").arg(user->avatarMediaId()));
QUrlQuery q(url.query());
q.addQueryItem(QStringLiteral("user_id"), user->id());
url.setQuery(q);
return url;
#endif
}