Skip to content

Commit 2b5d2e9

Browse files
committed
sdk: add documentation on Backups::utd_event_handler
1 parent 0b9daa2 commit 2b5d2e9

File tree

1 file changed

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

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,13 @@ impl Backups {
878878
}
879879
}
880880

881+
/// Handle UTD events by triggering download from key backup.
882+
///
883+
/// This function is registered as an event handler; it exists to deal
884+
/// with cases where [`Room::decrypt_event`] is not called and instead the
885+
/// event should be decrypted by the time this crate sees the event, such as
886+
/// for events received via `/sync` (as opposed to via `/messages`,
887+
/// `/context`, etc.)
881888
#[allow(clippy::unused_async)] // Because it's used as an event handler, which must be async.
882889
pub(crate) async fn utd_event_handler(
883890
event: SyncRoomEncryptedEvent,

0 commit comments

Comments
 (0)