client-api: Fix event type inside sync_events::v4 required_state fields

This commit is contained in:
Benjamin Kampmann 2023-02-08 08:03:31 +00:00 committed by GitHub
parent 94c01077c5
commit 6cd3935280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ use ruma_common::{
events::{ events::{
AnyEphemeralRoomEvent, AnyGlobalAccountDataEvent, AnyRoomAccountDataEvent, AnyEphemeralRoomEvent, AnyGlobalAccountDataEvent, AnyRoomAccountDataEvent,
AnyStrippedStateEvent, AnySyncStateEvent, AnySyncTimelineEvent, AnyToDeviceEvent, AnyStrippedStateEvent, AnySyncStateEvent, AnySyncTimelineEvent, AnyToDeviceEvent,
TimelineEventType, StateEventType,
}, },
metadata, metadata,
serde::{duration::opt_ms, Raw}, serde::{duration::opt_ms, Raw},
@ -293,7 +293,7 @@ pub struct RoomDetailsConfig {
/// Note that elements of this array are NOT sticky so they must be specified in full when they /// Note that elements of this array are NOT sticky so they must be specified in full when they
/// are changed. Sticky. /// are changed. Sticky.
#[serde(default, skip_serializing_if = "Vec::is_empty")] #[serde(default, skip_serializing_if = "Vec::is_empty")]
pub required_state: Vec<(TimelineEventType, String)>, pub required_state: Vec<(StateEventType, String)>,
/// The maximum number of timeline events to return per room. Sticky. /// The maximum number of timeline events to return per room. Sticky.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -309,7 +309,7 @@ pub struct IncludeOldRooms {
/// Note that elements of this array are NOT sticky so they must be specified in full when they /// Note that elements of this array are NOT sticky so they must be specified in full when they
/// are changed. Sticky. /// are changed. Sticky.
#[serde(default, skip_serializing_if = "Vec::is_empty")] #[serde(default, skip_serializing_if = "Vec::is_empty")]
pub required_state: Vec<(TimelineEventType, String)>, pub required_state: Vec<(StateEventType, String)>,
/// The maximum number of timeline events to return per room. Sticky. /// The maximum number of timeline events to return per room. Sticky.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -325,7 +325,7 @@ pub struct RoomSubscription {
/// Note that elements of this array are NOT sticky so they must be specified in full when they /// Note that elements of this array are NOT sticky so they must be specified in full when they
/// are changed. Sticky. /// are changed. Sticky.
#[serde(default, skip_serializing_if = "Vec::is_empty")] #[serde(default, skip_serializing_if = "Vec::is_empty")]
pub required_state: Vec<(TimelineEventType, String)>, pub required_state: Vec<(StateEventType, String)>,
/// The maximum number of timeline events to return per room. Sticky. /// The maximum number of timeline events to return per room. Sticky.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]