mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 17:40:47 +03:00
Fix request key loops
This commit is contained in:
parent
73244afdb8
commit
5fbf17f6ec
1 changed files with 5 additions and 2 deletions
|
@ -242,7 +242,9 @@ EventStore::receivedSessionKey(const std::string &session_id)
|
|||
return;
|
||||
|
||||
auto request = pending_key_requests.at(session_id);
|
||||
pending_key_requests.erase(session_id);
|
||||
|
||||
// Don't request keys again until Nheko is restarted (for now)
|
||||
pending_key_requests[session_id].events.clear();
|
||||
|
||||
olm::send_key_request_for(request.events.front(), request.request_id, true);
|
||||
|
||||
|
@ -778,7 +780,8 @@ EventStore::fetchMore()
|
|||
if (cache::client()->previousBatchToken(room_id_) != opts.from) {
|
||||
nhlog::net()->warn("Cache cleared while fetching more messages, dropping "
|
||||
"/messages response");
|
||||
emit fetchedMore();
|
||||
if (!opts.to.empty())
|
||||
emit fetchedMore();
|
||||
return;
|
||||
}
|
||||
if (err) {
|
||||
|
|
Loading…
Reference in a new issue