fix: encryption and sync spam

This commit is contained in:
Timo Kösters 2020-09-17 22:41:43 +02:00
parent 8bcfff2766
commit 267c721616
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
3 changed files with 67 additions and 44 deletions

View file

@ -521,8 +521,7 @@ impl Rooms {
if let Some(old_state_hash) = self.roomid_statehash.get(new_pdu.room_id.as_bytes())? {
// Store state for event. The state does not include the event itself.
// Instead it's the state before the pdu, so the room's old state.
self.pduid_statehash
.insert(new_pdu_id, &old_state_hash)?;
self.pduid_statehash.insert(new_pdu_id, &old_state_hash)?;
if new_pdu.state_key.is_none() {
return Ok(old_state_hash);
}

View file

@ -603,7 +603,7 @@ impl Users {
.room_state_get(&room_id, &EventType::RoomEncryption, "")?
.is_none()
{
return Ok(());
continue;
}
let mut key = room_id.to_string().as_bytes().to_vec();