knocking implementation
Signed-off-by: strawberry <strawberry@puppygock.gay> add sync bit of knocking Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
fabd3cf567
commit
5a1c41e66b
14 changed files with 978 additions and 117 deletions
|
@ -186,14 +186,13 @@ async fn create_join_event(
|
|||
.map_err(|e| err!(Request(InvalidParam(warn!("Failed to sign send_join event: {e}")))))?;
|
||||
|
||||
let origin: OwnedServerName = serde_json::from_value(
|
||||
serde_json::to_value(
|
||||
value
|
||||
.get("origin")
|
||||
.ok_or_else(|| err!(Request(BadJson("Event missing origin property."))))?,
|
||||
)
|
||||
.expect("CanonicalJson is valid json value"),
|
||||
value
|
||||
.get("origin")
|
||||
.ok_or_else(|| err!(Request(BadJson("Event does not have an origin server name."))))?
|
||||
.clone()
|
||||
.into(),
|
||||
)
|
||||
.map_err(|e| err!(Request(BadJson(warn!("origin field is not a valid server name: {e}")))))?;
|
||||
.map_err(|e| err!(Request(BadJson("Event has an invalid origin server name: {e}"))))?;
|
||||
|
||||
let mutex_lock = services
|
||||
.rooms
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue