mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-12-29 13:14:26 +01:00
Log underlying error when rejecting sendjoin response
This commit is contained in:
parent
3bfdae795d
commit
98e81c6217
1 changed files with 15 additions and 13 deletions
|
@ -619,7 +619,7 @@ async fn join_room_by_id_helper(
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Ok(signature) = signed_value["signatures"]
|
match signed_value["signatures"]
|
||||||
.as_object()
|
.as_object()
|
||||||
.ok_or(Error::BadRequest(
|
.ok_or(Error::BadRequest(
|
||||||
ErrorKind::InvalidParam,
|
ErrorKind::InvalidParam,
|
||||||
|
@ -630,20 +630,22 @@ async fn join_room_by_id_helper(
|
||||||
ErrorKind::InvalidParam,
|
ErrorKind::InvalidParam,
|
||||||
"Server did not send its signature",
|
"Server did not send its signature",
|
||||||
))
|
))
|
||||||
})
|
}) {
|
||||||
{
|
Ok(signature) => {
|
||||||
join_event
|
join_event
|
||||||
.get_mut("signatures")
|
.get_mut("signatures")
|
||||||
.expect("we created a valid pdu")
|
.expect("we created a valid pdu")
|
||||||
.as_object_mut()
|
.as_object_mut()
|
||||||
.expect("we created a valid pdu")
|
.expect("we created a valid pdu")
|
||||||
.insert(remote_server.to_string(), signature.clone());
|
.insert(remote_server.to_string(), signature.clone());
|
||||||
} else {
|
}
|
||||||
|
Err(e) => {
|
||||||
warn!(
|
warn!(
|
||||||
"Server {remote_server} sent invalid signature in sendjoin signatures for event {signed_value:?}",
|
"Server {remote_server} sent invalid signature in sendjoin signatures for event {signed_value:?}: {e:?}",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
services().rooms.short.get_or_create_shortroomid(room_id)?;
|
services().rooms.short.get_or_create_shortroomid(room_id)?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue