From 24154195a00390a33542603b968e94022487587c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= <76261501+zecakeh@users.noreply.github.com> Date: Fri, 7 May 2021 11:53:35 +0200 Subject: [PATCH] events: Construct EncryptedEventContent from EncryptedEventScheme --- crates/ruma-events/src/room/encrypted.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/ruma-events/src/room/encrypted.rs b/crates/ruma-events/src/room/encrypted.rs index 4b50d4e7..205e2837 100644 --- a/crates/ruma-events/src/room/encrypted.rs +++ b/crates/ruma-events/src/room/encrypted.rs @@ -48,6 +48,12 @@ impl EncryptedEventContent { } } +impl From for EncryptedEventContent { + fn from(scheme: EncryptedEventScheme) -> Self { + Self { scheme, relates_to: None } + } +} + /// The to-device version of the payload for the `EncryptedEvent`. pub type EncryptedToDeviceEventContent = EncryptedEventContent;