Fix confusion between initial / stripped state events
InviteState contains stripped state events, and initial state events are not used anywhere in the sync response.
This commit is contained in:
parent
1ea9c9a915
commit
140630745f
2 changed files with 8 additions and 13 deletions
|
@ -2191,8 +2191,12 @@ impl Client {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Destructure room_info
|
// FIXME: Destructure room_info
|
||||||
self.handle_sync_events(EventKind::InitialState, &room, &room_info.invite_state.events)
|
self.handle_sync_events(
|
||||||
.await?;
|
EventKind::StrippedState,
|
||||||
|
&room,
|
||||||
|
&room_info.invite_state.events,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
for handler in &*self.notification_handlers.read().await {
|
for handler in &*self.notification_handlers.read().await {
|
||||||
|
|
|
@ -47,7 +47,7 @@ pub enum EventKind {
|
||||||
EphemeralRoomData,
|
EphemeralRoomData,
|
||||||
Message { redacted: bool },
|
Message { redacted: bool },
|
||||||
State { redacted: bool },
|
State { redacted: bool },
|
||||||
StrippedState { redacted: bool },
|
StrippedState,
|
||||||
InitialState,
|
InitialState,
|
||||||
ToDevice,
|
ToDevice,
|
||||||
Presence,
|
Presence,
|
||||||
|
@ -398,8 +398,7 @@ mod static_events {
|
||||||
where
|
where
|
||||||
C: StaticEventContent + events::StateEventContent,
|
C: StaticEventContent + events::StateEventContent,
|
||||||
{
|
{
|
||||||
const ID: (EventKind, &'static str) =
|
const ID: (EventKind, &'static str) = (EventKind::StrippedState, C::TYPE);
|
||||||
(EventKind::StrippedState { redacted: false }, C::TYPE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C> SyncEvent for events::InitialStateEvent<C>
|
impl<C> SyncEvent for events::InitialStateEvent<C>
|
||||||
|
@ -433,12 +432,4 @@ mod static_events {
|
||||||
{
|
{
|
||||||
const ID: (EventKind, &'static str) = (EventKind::State { redacted: true }, C::TYPE);
|
const ID: (EventKind, &'static str) = (EventKind::State { redacted: true }, C::TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C> SyncEvent for events::RedactedStrippedStateEvent<C>
|
|
||||||
where
|
|
||||||
C: StaticEventContent + events::RedactedStateEventContent,
|
|
||||||
{
|
|
||||||
const ID: (EventKind, &'static str) =
|
|
||||||
(EventKind::StrippedState { redacted: true }, C::TYPE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue