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`
|
* Wrap `Pdu`s in `backfill::get_backfill` in `Raw`
|
||||||
* Use `ruma_identifiers::MxcUri` instead of `String` for `avatar_url` in
|
* Use `ruma_identifiers::MxcUri` instead of `String` for `avatar_url` in
|
||||||
`query::get_profile_information::v1`
|
`query::get_profile_information::v1`
|
||||||
|
* Rename `homeserver` property to `server` on `discover_homeserver::Response`
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
@ -38,6 +39,10 @@ Improvements:
|
|||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* Fixes `discover_homeserver::Response` serialization and deserialization
|
||||||
|
|
||||||
# 0.0.3
|
# 0.0.3
|
||||||
|
|
||||||
Breaking Changes:
|
Breaking Changes:
|
||||||
|
@ -17,9 +17,9 @@ ruma_api! {
|
|||||||
request: {}
|
request: {}
|
||||||
|
|
||||||
response: {
|
response: {
|
||||||
/// The server name to delegate server-server communciations to, with optional port.
|
/// The server name to delegate server-server communications to, with optional port.
|
||||||
#[serde(rename = "m.homeserver")]
|
#[serde(rename = "m.server")]
|
||||||
pub homeserver: ServerNameBox,
|
pub server: ServerNameBox,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ impl Request {
|
|||||||
|
|
||||||
impl Response {
|
impl Response {
|
||||||
/// Creates a new `Response` with the given homeserver.
|
/// Creates a new `Response` with the given homeserver.
|
||||||
pub fn new(homeserver: ServerNameBox) -> Self {
|
pub fn new(server: ServerNameBox) -> Self {
|
||||||
Self { homeserver }
|
Self { server }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user