1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use ruma_api::ruma_api;
use serde::{Deserialize, Serialize};
use url::Url;
#[derive(Clone, Debug, Deserialize, Hash, PartialEq, PartialOrd, Serialize)]
pub struct HomeserverInfo {
pub base_url: Url,
}
#[derive(Clone, Debug, Deserialize, Hash, PartialEq, PartialOrd, Serialize)]
pub struct IdentityServerInfo {
pub base_url: Url,
}
ruma_api! {
metadata {
description: "Get discovery information about the domain.",
method: GET,
name: "discover_homeserver",
path: "/.well-known/matrix/client",
rate_limited: false,
requires_authentication: false,
}
request {}
response {
#[serde(rename = "m.homeserver")]
pub homeserver: HomeserverInfo,
#[serde(rename = "m.identity_server")]
pub identity_server: Option<IdentityServerInfo>,
}
error: crate::Error
}