events: Construct EncryptedEventContent from EncryptedEventScheme

This commit is contained in:
Kévin Commaille 2021-05-07 11:53:35 +02:00 committed by GitHub
parent db76c22180
commit 24154195a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,12 @@ impl EncryptedEventContent {
} }
} }
impl From<EncryptedEventScheme> for EncryptedEventContent {
fn from(scheme: EncryptedEventScheme) -> Self {
Self { scheme, relates_to: None }
}
}
/// The to-device version of the payload for the `EncryptedEvent`. /// The to-device version of the payload for the `EncryptedEvent`.
pub type EncryptedToDeviceEventContent = EncryptedEventContent; pub type EncryptedToDeviceEventContent = EncryptedEventContent;