fix optional config section related
split api/client well_known simplify well_known config access Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
5f1cab6850
commit
f30b08f015
9 changed files with 144 additions and 138 deletions
|
@ -10,7 +10,7 @@ pub(crate) async fn well_known_server(
|
|||
State(services): State<crate::State>, _body: Ruma<discover_homeserver::Request>,
|
||||
) -> Result<discover_homeserver::Response> {
|
||||
Ok(discover_homeserver::Response {
|
||||
server: match services.globals.well_known_server() {
|
||||
server: match services.server.config.well_known.server.as_ref() {
|
||||
Some(server_name) => server_name.to_owned(),
|
||||
None => return Err(Error::BadRequest(ErrorKind::NotFound, "Not found.")),
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue