Merge remote-tracking branch 'upstream/main' into conduwuit-changes
This commit is contained in:
commit
fd26b59718
@ -36,6 +36,8 @@ Improvements:
|
|||||||
- Add support for recursion on the `get_relating_events` endpoints, according to
|
- Add support for recursion on the `get_relating_events` endpoints, according to
|
||||||
MSC3981 / Matrix 1.10
|
MSC3981 / Matrix 1.10
|
||||||
- Add server support discovery endpoint, according to MSC1929 / Matrix 1.10
|
- Add server support discovery endpoint, according to MSC1929 / Matrix 1.10
|
||||||
|
- Add `dir` `Request` field on the `get_relating_events_with_rel_types` and
|
||||||
|
`get_relating_events_with_rel_type_and_event_type` endpoints
|
||||||
|
|
||||||
# 0.17.4
|
# 0.17.4
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ pub mod v1 {
|
|||||||
///
|
///
|
||||||
/// If `recurse` was not set, this field must be absent.
|
/// If `recurse` was not set, this field must be absent.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
recursion_depth: Option<UInt>,
|
pub recursion_depth: Option<UInt>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Request {
|
impl Request {
|
||||||
|
@ -10,7 +10,7 @@ pub mod v1 {
|
|||||||
|
|
||||||
use js_int::UInt;
|
use js_int::UInt;
|
||||||
use ruma_common::{
|
use ruma_common::{
|
||||||
api::{request, response, Metadata},
|
api::{request, response, Direction, Metadata},
|
||||||
metadata,
|
metadata,
|
||||||
serde::Raw,
|
serde::Raw,
|
||||||
OwnedEventId, OwnedRoomId,
|
OwnedEventId, OwnedRoomId,
|
||||||
@ -56,6 +56,13 @@ pub mod v1 {
|
|||||||
#[ruma_api(query)]
|
#[ruma_api(query)]
|
||||||
pub from: Option<String>,
|
pub from: Option<String>,
|
||||||
|
|
||||||
|
/// The direction to return events from.
|
||||||
|
///
|
||||||
|
/// Defaults to [`Direction::Backward`].
|
||||||
|
#[serde(default, skip_serializing_if = "ruma_common::serde::is_default")]
|
||||||
|
#[ruma_api(query)]
|
||||||
|
pub dir: Direction,
|
||||||
|
|
||||||
/// The pagination token to stop returning results at.
|
/// The pagination token to stop returning results at.
|
||||||
///
|
///
|
||||||
/// If `None`, results continue up to `limit` or until there are no more events.
|
/// If `None`, results continue up to `limit` or until there are no more events.
|
||||||
@ -119,13 +126,22 @@ pub mod v1 {
|
|||||||
///
|
///
|
||||||
/// If `recurse` was not set, this field must be absent.
|
/// If `recurse` was not set, this field must be absent.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
recursion_depth: Option<UInt>,
|
pub recursion_depth: Option<UInt>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Request {
|
impl Request {
|
||||||
/// Creates a new `Request` with the given room ID, parent event ID and relationship type.
|
/// Creates a new `Request` with the given room ID, parent event ID and relationship type.
|
||||||
pub fn new(room_id: OwnedRoomId, event_id: OwnedEventId, rel_type: RelationType) -> Self {
|
pub fn new(room_id: OwnedRoomId, event_id: OwnedEventId, rel_type: RelationType) -> Self {
|
||||||
Self { room_id, event_id, rel_type, from: None, to: None, limit: None, recurse: false }
|
Self {
|
||||||
|
room_id,
|
||||||
|
event_id,
|
||||||
|
dir: Direction::default(),
|
||||||
|
rel_type,
|
||||||
|
from: None,
|
||||||
|
to: None,
|
||||||
|
limit: None,
|
||||||
|
recurse: false,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ pub mod v1 {
|
|||||||
|
|
||||||
use js_int::UInt;
|
use js_int::UInt;
|
||||||
use ruma_common::{
|
use ruma_common::{
|
||||||
api::{request, response, Metadata},
|
api::{request, response, Direction, Metadata},
|
||||||
metadata,
|
metadata,
|
||||||
serde::Raw,
|
serde::Raw,
|
||||||
OwnedEventId, OwnedRoomId,
|
OwnedEventId, OwnedRoomId,
|
||||||
@ -63,6 +63,13 @@ pub mod v1 {
|
|||||||
#[ruma_api(query)]
|
#[ruma_api(query)]
|
||||||
pub from: Option<String>,
|
pub from: Option<String>,
|
||||||
|
|
||||||
|
/// The direction to return events from.
|
||||||
|
///
|
||||||
|
/// Defaults to [`Direction::Backward`].
|
||||||
|
#[serde(default, skip_serializing_if = "ruma_common::serde::is_default")]
|
||||||
|
#[ruma_api(query)]
|
||||||
|
pub dir: Direction,
|
||||||
|
|
||||||
/// The pagination token to stop returning results at.
|
/// The pagination token to stop returning results at.
|
||||||
///
|
///
|
||||||
/// If `None`, results continue up to `limit` or until there are no more events.
|
/// If `None`, results continue up to `limit` or until there are no more events.
|
||||||
@ -126,7 +133,7 @@ pub mod v1 {
|
|||||||
///
|
///
|
||||||
/// If `recurse` was not set, this field must be absent.
|
/// If `recurse` was not set, this field must be absent.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
recursion_depth: Option<UInt>,
|
pub recursion_depth: Option<UInt>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Request {
|
impl Request {
|
||||||
@ -144,6 +151,7 @@ pub mod v1 {
|
|||||||
rel_type,
|
rel_type,
|
||||||
event_type,
|
event_type,
|
||||||
from: None,
|
from: None,
|
||||||
|
dir: Direction::default(),
|
||||||
to: None,
|
to: None,
|
||||||
limit: None,
|
limit: None,
|
||||||
recurse: false,
|
recurse: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user