aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connection.cpp7
-rw-r--r--connection.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/connection.cpp b/connection.cpp
index 01d7461d..e06baef7 100644
--- a/connection.cpp
+++ b/connection.cpp
@@ -62,7 +62,7 @@ class Connection::Private
// Leave state of the same room.
QHash<QPair<QString, bool>, Room*> roomMap;
QVector<QString> roomIdsToForget;
- QHash<QString, User*> userMap;
+ QMap<QString, User*> userMap;
QString userId;
SyncJob* syncJob = nullptr;
@@ -516,6 +516,11 @@ QHash< QPair<QString, bool>, Room* > Connection::roomMap() const
return roomMap;
}
+QMap<QString, User*> Connection::users() const
+{
+ return d->userMap;
+}
+
const ConnectionData* Connection::connectionData() const
{
return d->data.get();
diff --git a/connection.h b/connection.h
index 792ed126..2f7c38b3 100644
--- a/connection.h
+++ b/connection.h
@@ -71,6 +71,7 @@ namespace QMatrixClient
virtual ~Connection();
QHash<QPair<QString, bool>, Room*> roomMap() const;
+ QMap<QString, User*> users() const;
/** Sends /forget to the server and also deletes room locally.
* This method is in Connection, not in Room, since it's a