aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/connection.cpp1
-rw-r--r--lib/user.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 241fa43d..f2bbf903 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -590,6 +590,7 @@ Room* Connection::invitation(const QString& roomId) const
User* Connection::user(const QString& userId)
{
+ Q_ASSERT(userId.startsWith('@') && userId.contains(':'));
if( d->userMap.contains(userId) )
return d->userMap.value(userId);
auto* user = userFactory(this, userId);
diff --git a/lib/user.cpp b/lib/user.cpp
index 88d20276..c4fbfe35 100644
--- a/lib/user.cpp
+++ b/lib/user.cpp
@@ -311,7 +311,7 @@ QString User::displayname(const Room* room) const
{
auto name = d->nameForRoom(room);
return name.isEmpty() ? d->userId :
- room ? room->roomMembername(name) : name;
+ room ? room->roomMembername(this) : name;
}
QString User::fullName(const Room* room) const