aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r--lib/connection.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index a5c74d88..2bdbb2e5 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -336,6 +336,7 @@ void Connection::onSyncSuccess(SyncData &&data) {
}
d->accountData[accountEvent->jsonType()] =
accountEvent->contentJson().toVariantHash();
+ emit accountDataChanged(accountEvent->jsonType());
}
}
@@ -647,6 +648,16 @@ QHash< QPair<QString, bool>, Room* > Connection::roomMap() const
return roomMap;
}
+bool Connection::hasAccountData(const QString& type) const
+{
+ return d->accountData.contains(type);
+}
+
+QVariantHash Connection::accountData(const QString& type) const
+{
+ return d->accountData.value(type);
+}
+
QHash<QString, QVector<Room*>> Connection::tagsToRooms() const
{
QHash<QString, QVector<Room*>> result;