summary refs log tree commit diff
path: root/src/Cache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cache.cpp')
-rw-r--r--src/Cache.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp

index 8b1798d6..144a2d9a 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp
@@ -1772,6 +1772,13 @@ Cache::relatedEvents(const std::string &room_id, const std::string &event_id) return related_ids; } +size_t +Cache::memberCount(const std::string &room_id) +{ + auto txn = lmdb::txn::begin(env_, nullptr, MDB_RDONLY); + return getMembersDb(txn, room_id).size(txn); +} + QMap<QString, RoomInfo> Cache::roomInfo(bool withInvites) {