client-api: RoomSummary::heroes
must be OwnedUserId
s, in fact
This is imprecise from the spec wording [1], apart from a hint [2], but these should really be user ids. In practice, this is what Synapse returns too [1]https://spec.matrix.org/latest/client-server-api/#_matrixclientv3sync_roomsummary [2] "The list must never include the client’s own user ID."
This commit is contained in:
parent
6cd3af9b86
commit
75e8829bec
@ -36,6 +36,8 @@ Breaking changes:
|
|||||||
It will now return the proper status code and headers depending on the variant
|
It will now return the proper status code and headers depending on the variant
|
||||||
used.
|
used.
|
||||||
- The http crate had a major version bump to version 1.1
|
- The http crate had a major version bump to version 1.1
|
||||||
|
- `RoomSummary::heroes` now properly contains only `UserId` instead of `String`
|
||||||
|
as before.
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ use ruma_common::{
|
|||||||
metadata,
|
metadata,
|
||||||
presence::PresenceState,
|
presence::PresenceState,
|
||||||
serde::Raw,
|
serde::Raw,
|
||||||
DeviceKeyAlgorithm, OwnedEventId, OwnedRoomId,
|
DeviceKeyAlgorithm, OwnedEventId, OwnedRoomId, OwnedUserId,
|
||||||
};
|
};
|
||||||
use ruma_events::{
|
use ruma_events::{
|
||||||
presence::PresenceEvent, AnyGlobalAccountDataEvent, AnyRoomAccountDataEvent,
|
presence::PresenceEvent, AnyGlobalAccountDataEvent, AnyRoomAccountDataEvent,
|
||||||
@ -470,7 +470,7 @@ pub struct RoomSummary {
|
|||||||
///
|
///
|
||||||
/// Required if room name or canonical aliases are not set or empty.
|
/// Required if room name or canonical aliases are not set or empty.
|
||||||
#[serde(rename = "m.heroes", default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(rename = "m.heroes", default, skip_serializing_if = "Vec::is_empty")]
|
||||||
pub heroes: Vec<String>,
|
pub heroes: Vec<OwnedUserId>,
|
||||||
|
|
||||||
/// Number of users whose membership status is `join`.
|
/// Number of users whose membership status is `join`.
|
||||||
/// Required if field has changed since last sync; otherwise, it may be
|
/// Required if field has changed since last sync; otherwise, it may be
|
||||||
|
Loading…
x
Reference in New Issue
Block a user