Fix type of account_data in get_{global,room}_account_data
This commit is contained in:
parent
21f46520d9
commit
0df3a68f30
@ -1,7 +1,7 @@
|
|||||||
//! [GET /_matrix/client/r0/user/{userId}/account_data/{type}](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-user-userid-account-data-type)
|
//! [GET /_matrix/client/r0/user/{userId}/account_data/{type}](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-user-userid-account-data-type)
|
||||||
|
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
use ruma_events::AnyBasicEvent;
|
use ruma_events::AnyBasicEventContent;
|
||||||
use ruma_identifiers::UserId;
|
use ruma_identifiers::UserId;
|
||||||
use ruma_serde::Raw;
|
use ruma_serde::Raw;
|
||||||
|
|
||||||
@ -27,8 +27,10 @@ ruma_api! {
|
|||||||
|
|
||||||
response: {
|
response: {
|
||||||
/// Account data content for the given type.
|
/// Account data content for the given type.
|
||||||
|
///
|
||||||
|
/// Use `ruma_events::RawExt` for deserialization.
|
||||||
#[ruma_api(body)]
|
#[ruma_api(body)]
|
||||||
pub account_data: Raw<AnyBasicEvent>,
|
pub account_data: Raw<AnyBasicEventContent>,
|
||||||
}
|
}
|
||||||
|
|
||||||
error: crate::Error
|
error: crate::Error
|
||||||
@ -43,7 +45,7 @@ impl<'a> Request<'a> {
|
|||||||
|
|
||||||
impl Response {
|
impl Response {
|
||||||
/// Creates a new `Response` with the given account data.
|
/// Creates a new `Response` with the given account data.
|
||||||
pub fn new(account_data: Raw<AnyBasicEvent>) -> Self {
|
pub fn new(account_data: Raw<AnyBasicEventContent>) -> Self {
|
||||||
Self { account_data }
|
Self { account_data }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//! [GET /_matrix/client/r0/user/{userId}/rooms/{roomId}/account_data/{type}](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-user-userid-rooms-roomid-account-data-type)
|
//! [GET /_matrix/client/r0/user/{userId}/rooms/{roomId}/account_data/{type}](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-user-userid-rooms-roomid-account-data-type)
|
||||||
|
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
use ruma_events::AnyBasicEvent;
|
use ruma_events::AnyBasicEventContent;
|
||||||
use ruma_identifiers::{RoomId, UserId};
|
use ruma_identifiers::{RoomId, UserId};
|
||||||
use ruma_serde::Raw;
|
use ruma_serde::Raw;
|
||||||
|
|
||||||
@ -31,8 +31,10 @@ ruma_api! {
|
|||||||
|
|
||||||
response: {
|
response: {
|
||||||
/// Account data content for the given type.
|
/// Account data content for the given type.
|
||||||
|
///
|
||||||
|
/// Use `ruma_events::RawExt` for deserialization.
|
||||||
#[ruma_api(body)]
|
#[ruma_api(body)]
|
||||||
pub account_data: Raw<AnyBasicEvent>,
|
pub account_data: Raw<AnyBasicEventContent>,
|
||||||
}
|
}
|
||||||
|
|
||||||
error: crate::Error
|
error: crate::Error
|
||||||
@ -47,7 +49,7 @@ impl<'a> Request<'a> {
|
|||||||
|
|
||||||
impl Response {
|
impl Response {
|
||||||
/// Creates a new `Response` with the given account data.
|
/// Creates a new `Response` with the given account data.
|
||||||
pub fn new(account_data: Raw<AnyBasicEvent>) -> Self {
|
pub fn new(account_data: Raw<AnyBasicEventContent>) -> Self {
|
||||||
Self { account_data }
|
Self { account_data }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user