Properly deserialize well-known response
According to the spec (https://matrix.org/docs/spec/server_server/r0.1.4#get-well-known-matrix-server), the expected field to receive the delegated name is `m.server` instead of `m.homeserver`.
This commit is contained in:
parent
f940ff5d11
commit
325f2f918c
@ -11,6 +11,7 @@ Breaking Changes:
|
||||
* Wrap `Pdu`s in `backfill::get_backfill` in `Raw`
|
||||
* Use `ruma_identifiers::MxcUri` instead of `String` for `avatar_url` in
|
||||
`query::get_profile_information::v1`
|
||||
* Rename `homeserver` property to `server` on `discover_homeserver::Response`
|
||||
|
||||
Improvements:
|
||||
|
||||
@ -38,6 +39,10 @@ Improvements:
|
||||
},
|
||||
```
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* Fixes `discover_homeserver::Response` serialization and deserialization
|
||||
|
||||
# 0.0.3
|
||||
|
||||
Breaking Changes:
|
||||
|
@ -17,9 +17,9 @@ ruma_api! {
|
||||
request: {}
|
||||
|
||||
response: {
|
||||
/// The server name to delegate server-server communciations to, with optional port.
|
||||
#[serde(rename = "m.homeserver")]
|
||||
pub homeserver: ServerNameBox,
|
||||
/// The server name to delegate server-server communications to, with optional port.
|
||||
#[serde(rename = "m.server")]
|
||||
pub server: ServerNameBox,
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ impl Request {
|
||||
|
||||
impl Response {
|
||||
/// Creates a new `Response` with the given homeserver.
|
||||
pub fn new(homeserver: ServerNameBox) -> Self {
|
||||
Self { homeserver }
|
||||
pub fn new(server: ServerNameBox) -> Self {
|
||||
Self { server }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user