fix: allow handling create event itself

recoverbroken
Timo Kösters 1 year ago
parent 7bdd9660aa
commit fcfb06ffa6
No known key found for this signature in database
GPG Key ID: 0B25E636FBA7E4CB

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

Loading…
Cancel
Save