diff --git a/crates/ruma-events/src/room/encrypted.rs b/crates/ruma-events/src/room/encrypted.rs index bdcb2aa6..4b50d4e7 100644 --- a/crates/ruma-events/src/room/encrypted.rs +++ b/crates/ruma-events/src/room/encrypted.rs @@ -41,6 +41,13 @@ pub struct EncryptedEventContent { pub relates_to: Option, } +impl EncryptedEventContent { + /// Creates a new `EncryptedEventContent` with the given scheme and relation. + pub fn new(scheme: EncryptedEventScheme, relates_to: Option) -> Self { + Self { scheme, relates_to } + } +} + /// The to-device version of the payload for the `EncryptedEvent`. pub type EncryptedToDeviceEventContent = EncryptedEventContent;