Skip to content

Commit f1802d9

Browse files
committed
sdk: update Backups::utd_event_handler api
Make it take a `Raw<OriginalSyncRoomEncryptedEvent>`, to be consistent with `Room::decrypt_event`.
1 parent 2b5d2e9 commit f1802d9

File tree

1 file changed

+3
-3
lines changed
  • crates/matrix-sdk/src/encryption/backups

1 file changed

+3
-3
lines changed

crates/matrix-sdk/src/encryption/backups/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use ruma::{
3737
error::ErrorKind,
3838
},
3939
events::{
40-
room::encrypted::{EncryptedEventScheme, SyncRoomEncryptedEvent},
40+
room::encrypted::{EncryptedEventScheme, OriginalSyncRoomEncryptedEvent},
4141
secret::{request::SecretName, send::ToDeviceSecretSendEvent},
4242
},
4343
serde::Raw,
@@ -887,11 +887,11 @@ impl Backups {
887887
/// `/context`, etc.)
888888
#[allow(clippy::unused_async)] // Because it's used as an event handler, which must be async.
889889
pub(crate) async fn utd_event_handler(
890-
event: SyncRoomEncryptedEvent,
890+
event: Raw<OriginalSyncRoomEncryptedEvent>,
891891
room: Room,
892892
client: Client,
893893
) {
894-
if let Some(event) = event.as_original() {
894+
if let Ok(event) = event.deserialize() {
895895
if let EncryptedEventScheme::MegolmV1AesSha2(c) = &event.content.scheme {
896896
client
897897
.encryption()

0 commit comments

Comments
 (0)