Refactor for structured insertions
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
8258d16a94
commit
2ed0c267eb
31 changed files with 364 additions and 621 deletions
|
@ -7,7 +7,7 @@ use std::{
|
|||
use axum::extract::State;
|
||||
use conduit::{
|
||||
debug, err, error, is_equal_to,
|
||||
result::{FlatOk, IntoIsOk},
|
||||
result::FlatOk,
|
||||
utils::{
|
||||
math::{ruma_from_u64, ruma_from_usize, usize_from_ruma, usize_from_u64_truncated},
|
||||
BoolExt, IterStream, ReadyExt, TryFutureExtExt,
|
||||
|
@ -1136,8 +1136,7 @@ async fn share_encrypted_room(
|
|||
services
|
||||
.rooms
|
||||
.state_accessor
|
||||
.room_state_get(other_room_id, &StateEventType::RoomEncryption, "")
|
||||
.map(Result::into_is_ok)
|
||||
.is_encrypted_room(other_room_id)
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
|
|
@ -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."))?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue