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:
parent
7bdd9660aa
commit
fcfb06ffa6
1 changed files with 6 additions and 5 deletions
|
@ -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.",
|
||||||
|
|
Loading…
Reference in a new issue