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:
@@ -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.")),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user