mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 06:08:48 +03:00
Keep identities for users cached
There is not really a reason to stop tracking them, just because the server says so. We might still want to show a users profile, etc.
This commit is contained in:
parent
e88ab89c18
commit
1b82b8242b
2 changed files with 0 additions and 11 deletions
|
@ -1572,7 +1572,6 @@ Cache::saveState(const mtx::responses::Sync &res)
|
|||
savePresence(txn, res.presence);
|
||||
|
||||
markUserKeysOutOfDate(txn, userKeyCacheDb, res.device_lists.changed, currentBatchToken);
|
||||
deleteUserKeys(txn, userKeyCacheDb, res.device_lists.left);
|
||||
|
||||
removeLeftRooms(txn, res.rooms.leave);
|
||||
|
||||
|
@ -4124,13 +4123,6 @@ Cache::updateUserKeys(const std::string &sync_token, const mtx::responses::Query
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Cache::deleteUserKeys(lmdb::txn &txn, lmdb::dbi &db, const std::vector<std::string> &user_ids)
|
||||
{
|
||||
for (const auto &user_id : user_ids)
|
||||
db.del(txn, user_id);
|
||||
}
|
||||
|
||||
void
|
||||
Cache::markUserKeysOutOfDate(lmdb::txn &txn,
|
||||
lmdb::dbi &db,
|
||||
|
|
|
@ -55,9 +55,6 @@ public:
|
|||
lmdb::dbi &db,
|
||||
const std::vector<std::string> &user_ids,
|
||||
const std::string &sync_token);
|
||||
void deleteUserKeys(lmdb::txn &txn,
|
||||
lmdb::dbi &db,
|
||||
const std::vector<std::string> &user_ids);
|
||||
void query_keys(const std::string &user_id,
|
||||
std::function<void(const UserKeyCache &, mtx::http::RequestErr)> cb);
|
||||
|
||||
|
|
Loading…
Reference in a new issue