Merge pull request #11 from morguldir/conduwuit-changes

syncv3: use RoomType in sync filters
This commit is contained in:
June 🍓🦴 2024-08-24 00:20:51 -04:00 committed by GitHub
commit 92291c0100
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,7 @@ use ruma_common::{
api::{request, response, Metadata}, api::{request, response, Metadata},
metadata, metadata,
serde::{deserialize_cow_str, duration::opt_ms, Raw}, serde::{deserialize_cow_str, duration::opt_ms, Raw},
DeviceKeyAlgorithm, MilliSecondsSinceUnixEpoch, OwnedMxcUri, OwnedRoomId, OwnedUserId, RoomId, DeviceKeyAlgorithm, MilliSecondsSinceUnixEpoch, OwnedMxcUri, OwnedRoomId, OwnedUserId, RoomId, room::RoomType
}; };
use ruma_events::{ use ruma_events::{
receipt::SyncReceiptEvent, typing::SyncTypingEvent, AnyGlobalAccountDataEvent, receipt::SyncReceiptEvent, typing::SyncTypingEvent, AnyGlobalAccountDataEvent,
@ -230,14 +230,14 @@ pub struct SyncRequestListFilters {
/// returned regardless of type. This can be used to get the initial set of spaces for an /// returned regardless of type. This can be used to get the initial set of spaces for an
/// account. /// account.
#[serde(default, skip_serializing_if = "Vec::is_empty")] #[serde(default, skip_serializing_if = "Vec::is_empty")]
pub room_types: Vec<String>, pub room_types: Vec<Option<RoomType>>,
/// Only list rooms that are not of these create-types, or all. /// Only list rooms that are not of these create-types, or all.
/// ///
/// Same as "room_types" but inverted. This can be used to filter out spaces from the room /// Same as "room_types" but inverted. This can be used to filter out spaces from the room
/// list. /// list.
#[serde(default, skip_serializing_if = "<[_]>::is_empty")] #[serde(default, skip_serializing_if = "<[_]>::is_empty")]
pub not_room_types: Vec<String>, pub not_room_types: Vec<Option<RoomType>>,
/// Only list rooms matching the given string, or all. /// Only list rooms matching the given string, or all.
/// ///