Refactor for structured insertions

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk authored and strawberry committed 2024-10-26 18:50:29 -04:00
1 parent 8258d16a94
commit 2ed0c267eb
31 files changed
+364 -621

No files matched your search

-6
View File
@@ -65,12 +65,6 @@ pub(crate) async fn create_invite_route(
return Err!(Request(Forbidden("Server is banned on this homeserver.")));
}
if let Some(via) = &body.via {
if via.is_empty() {
return Err!(Request(InvalidParam("via field must not be empty.")));
}
}
let mut signed_event = utils::to_canonical_object(&body.event)
.map_err(|_| Error::BadRequest(ErrorKind::InvalidParam, "Invite event is invalid."))?;