mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-13 19:11:05 +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
|
||||
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…
Reference in a new issue