sytest test

This commit is contained in:
Timo Kösters 2021-03-26 13:41:05 +01:00
parent 8c6a49bec3
commit db7044a950
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
3 changed files with 394 additions and 5 deletions

View file

@ -1081,7 +1081,7 @@ impl Rooms {
signatures: BTreeMap::new(),
};
if !state_res::auth_check(
let auth_check = state_res::auth_check(
&room_version,
&Arc::new(pdu.clone()),
create_prev_event,
@ -1091,7 +1091,9 @@ impl Rooms {
.map_err(|e| {
error!("{:?}", e);
Error::bad_database("Auth check failed.")
})? {
})?;
if !auth_check {
return Err(Error::BadRequest(
ErrorKind::InvalidParam,
"Event is not authorized.",