Remove some commented out code and fix some formatting

This commit is contained in:
Damir Jelić
2023-04-05 13:22:41 +02:00
parent 1f8c67bbb2
commit 6fd129dcfa
2 changed files with 4 additions and 12 deletions

View File

@@ -452,10 +452,7 @@ impl Device {
message: encrypted.cast(),
}),
Err(
OlmError::MissingSession
| OlmError::EventError(EventError::MissingSenderKey)
) => {
Err(OlmError::MissingSession | OlmError::EventError(EventError::MissingSenderKey)) => {
Ok(MaybeEncryptedRoomKey::Withheld { code: WithheldCode::NoOlm })
}
Err(e) => Err(e),

View File

@@ -280,11 +280,6 @@ trait SqliteConnectionExt {
data: &[u8],
) -> rusqlite::Result<()>;
// fn get_direct_withheld_info(
// &self,
// session_id: Key,
// room_id: Key,
// ) -> rusqlite::Result<Option<Vec<u8>>>;
fn set_room_settings(&self, room_id: &[u8], data: &[u8]) -> rusqlite::Result<()>;
}
@@ -826,9 +821,9 @@ impl CryptoStore for SqliteCryptoStore {
let session_id = self.encode_key("inbound_group_session", session_id);
let Some((room_id_from_db, value)) =
self.acquire().await?.get_inbound_group_session(session_id).await?
else {
return Ok(None);
};
else {
return Ok(None);
};
let room_id = self.encode_key("inbound_group_session", room_id.as_bytes());
if *room_id != room_id_from_db {