From aedbbcdde792f3356158d79d5ce5adf23c1c8f4d Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 12 Aug 2022 18:16:05 +0200 Subject: [PATCH] fix(sdk)!: Remove SyncEvent implementation for InitialStateEvent Initial state events aren't actually received through sync, they're sent from the client to the server when creating a room. This change makes it impossible to register event handlers for initial state events. Previously, this was allowed, but the event handler was never called. --- crates/matrix-sdk/src/event_handler.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/crates/matrix-sdk/src/event_handler.rs b/crates/matrix-sdk/src/event_handler.rs index 58a95d76e..ff7e08995 100644 --- a/crates/matrix-sdk/src/event_handler.rs +++ b/crates/matrix-sdk/src/event_handler.rs @@ -77,7 +77,6 @@ pub enum EventKind { OriginalState, RedactedState, StrippedState, - InitialState, ToDevice, Presence, } @@ -681,14 +680,6 @@ mod static_events { const TYPE: &'static str = C::TYPE; } - impl SyncEvent for events::InitialStateEvent - where - C: StaticEventContent + StateEventContent, - { - const KIND: EventKind = EventKind::InitialState; - const TYPE: &'static str = C::TYPE; - } - impl SyncEvent for events::ToDeviceEvent where C: StaticEventContent + ToDeviceEventContent,