client-api: Use GlobalAccountDataEventType in get_global_account_data
This commit is contained in:
parent
4d40623ae4
commit
423c03f5d2
@ -15,6 +15,7 @@ Breaking changes:
|
||||
* Use `NewPushRule` to construct a `push::set_pushrule::v3::Request`
|
||||
* `Error` is now an enum because endpoint error construction is infallible (see changelog for
|
||||
`ruma-common`); the previous fields are in the `Standard` variant
|
||||
* Use `GlobalAccountDataEventType` for `event_type` in `config::get_global_account_data`
|
||||
|
||||
Improvements:
|
||||
|
||||
|
@ -9,7 +9,7 @@ pub mod v3 {
|
||||
|
||||
use ruma_common::{
|
||||
api::{request, response, Metadata},
|
||||
events::AnyGlobalAccountDataEventContent,
|
||||
events::{AnyGlobalAccountDataEventContent, GlobalAccountDataEventType},
|
||||
metadata,
|
||||
serde::Raw,
|
||||
OwnedUserId,
|
||||
@ -34,7 +34,7 @@ pub mod v3 {
|
||||
|
||||
/// Type of data to retrieve.
|
||||
#[ruma_api(path)]
|
||||
pub event_type: String,
|
||||
pub event_type: GlobalAccountDataEventType,
|
||||
}
|
||||
|
||||
/// Response type for the `get_global_account_data` endpoint.
|
||||
@ -49,7 +49,7 @@ pub mod v3 {
|
||||
|
||||
impl Request {
|
||||
/// Creates a new `Request` with the given user ID and event type.
|
||||
pub fn new(user_id: OwnedUserId, event_type: String) -> Self {
|
||||
pub fn new(user_id: OwnedUserId, event_type: GlobalAccountDataEventType) -> Self {
|
||||
Self { user_id, event_type }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user