diff --git a/src/Cache.cpp b/src/Cache.cpp index 3e1057c0..44b7d246 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -2414,6 +2414,9 @@ Cache::joinedRooms() std::optional Cache::getMember(const std::string &room_id, const std::string &user_id) { + if (user_id.empty()) + return std::nullopt; + try { auto txn = lmdb::txn::begin(env_, nullptr, MDB_RDONLY);