Use UserId instead of string in r0::account::whoami

This commit is contained in:
Philippe Laflamme 2020-06-24 10:19:25 -04:00 committed by GitHub
parent 2b6eba69dd
commit 567cfea7ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@ Breaking changes:
`Ruleset` type from `ruma_common::push` (also available as `ruma::push`) `Ruleset` type from `ruma_common::push` (also available as `ruma::push`)
* Fix event types in `r0::context::get_context` * Fix event types in `r0::context::get_context`
* Fix event types in `r0::sync::sync_events` * Fix event types in `r0::sync::sync_events`
* Update type of `user_id` in `r0::account::whoami` from `String` to `ruma_identifiers::UserId`
Improvements: Improvements:

View File

@ -1,6 +1,7 @@
//! [GET /_matrix/client/r0/account/whoami](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-account-whoami) //! [GET /_matrix/client/r0/account/whoami](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-account-whoami)
use ruma_api::ruma_api; use ruma_api::ruma_api;
use ruma_identifiers::UserId;
ruma_api! { ruma_api! {
metadata { metadata {
@ -16,7 +17,7 @@ ruma_api! {
response { response {
/// The id of the user that owns the access token. /// The id of the user that owns the access token.
pub user_id: String, pub user_id: UserId,
} }
error: crate::Error error: crate::Error