1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-11-17 12:50:50 +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
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.",