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,7 +2191,11 @@ impl Client {
|
|||
}
|
||||
|
||||
// FIXME: Destructure room_info
|
||||
self.handle_sync_events(EventKind::InitialState, &room, &room_info.invite_state.events)
|
||||
self.handle_sync_events(
|
||||
EventKind::StrippedState,
|
||||
&room,
|
||||
&room_info.invite_state.events,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ pub enum EventKind {
|
|||
EphemeralRoomData,
|
||||
Message { redacted: bool },
|
||||
State { redacted: bool },
|
||||
StrippedState { redacted: bool },
|
||||
StrippedState,
|
||||
InitialState,
|
||||
ToDevice,
|
||||
Presence,
|
||||
|
@ -398,8 +398,7 @@ mod static_events {
|
|||
where
|
||||
C: StaticEventContent + events::StateEventContent,
|
||||
{
|
||||
const ID: (EventKind, &'static str) =
|
||||
(EventKind::StrippedState { redacted: false }, C::TYPE);
|
||||
const ID: (EventKind, &'static str) = (EventKind::StrippedState, C::TYPE);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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