1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-11-17 12:10:51 +01:00

fix: allow handling create event itself

This commit is contained in:
Timo Kösters 2023-02-21 00:56:05 +01:00
parent 7bdd9660aa
commit fcfb06ffa6
No known key found for this signature in database
GPG key ID: 0B25E636FBA7E4CB

View file

@ -392,11 +392,12 @@ impl Service {
} }
// The original create event must be in the auth events // The original create event must be in the auth events
if auth_events if !matches!(
.get(&(StateEventType::RoomCreate, "".to_owned())) auth_events
.map(|a| a.as_ref()) .get(&(StateEventType::RoomCreate, "".to_owned()))
!= Some(create_event) .map(|a| a.as_ref()),
{ Some(_) | None
) {
return Err(Error::BadRequest( return Err(Error::BadRequest(
ErrorKind::InvalidParam, ErrorKind::InvalidParam,
"Incoming event refers to wrong create event.", "Incoming event refers to wrong create event.",