Add contains_url to RoomEventFilter (r0.3.0 compatibility)

This commit is contained in:
Aaron DeVore 2019-11-24 14:52:25 -08:00 committed by Jonas Platte
parent 2ae14de8e5
commit 6e665efd1c
2 changed files with 7 additions and 0 deletions

View File

@ -12,3 +12,4 @@ Improvements:
* Add `r0::directory::get_public_rooms_filtered` (introduced upstream in r0.3.0) * Add `r0::directory::get_public_rooms_filtered` (introduced upstream in r0.3.0)
* Add `filter` optional parameter to `r0::sync::get_message_events` (introduced upstream in r0.3.0) * Add `filter` optional parameter to `r0::sync::get_message_events` (introduced upstream in r0.3.0)
* Add `r0::appservice::set_room_visibility` (part of application service extensions for the client-server API) * Add `r0::appservice::set_room_visibility` (part of application service extensions for the client-server API)
* Add `contains_url` to `r0::filter::RoomEventFilter` (introduced upstream in r0.3.0)

View File

@ -58,6 +58,12 @@ pub struct RoomEventFilter {
/// match any sequence of characters. /// match any sequence of characters.
#[serde(default, skip_serializing_if = "Option::is_none")] #[serde(default, skip_serializing_if = "Option::is_none")]
pub types: Option<Vec<String>>, pub types: Option<Vec<String>>,
/// If `true` include only events with a URL key in their content.
/// If `false`, exclude such events.
///
/// If this item is absent then all event types are included.
#[serde(skip_serializing_if = "Option::is_none")]
pub contains_url: Option<bool>,
} }
/// Filters to be applied to room data /// Filters to be applied to room data