diff --git a/crates/ruma-common/src/events/enums.rs b/crates/ruma-common/src/events/enums.rs index 7002b2d2..83c9bef0 100644 --- a/crates/ruma-common/src/events/enums.rs +++ b/crates/ruma-common/src/events/enums.rs @@ -216,6 +216,15 @@ impl AnySyncTimelineEvent { } } +impl From for AnySyncTimelineEvent { + fn from(ev: AnyTimelineEvent) -> Self { + match ev { + AnyTimelineEvent::MessageLike(ev) => Self::MessageLike(ev.into()), + AnyTimelineEvent::State(ev) => Self::State(ev.into()), + } + } +} + #[derive(Deserialize)] #[allow(clippy::exhaustive_structs)] struct EventDeHelper {