client-api: Add missing sync::sync_events::v4::Response::txn_id
field
In the [specification], if the request contains a `txn_id` value, the response
must echo the same `txn_id`. Unfortunately, this field is missing from
`sync::sync_events::v4::Response::txn_id`. This patch addresses that problem by
adding the missing field.
[specification]: 89cf0341b5/proposals/3575-sync.md
This commit is contained in:
parent
bcb97b139d
commit
2edfe5bc5f
@ -97,6 +97,10 @@ pub struct Response {
|
|||||||
#[serde(default, skip_serializing_if = "ruma_common::serde::is_default")]
|
#[serde(default, skip_serializing_if = "ruma_common::serde::is_default")]
|
||||||
pub initial: bool,
|
pub initial: bool,
|
||||||
|
|
||||||
|
/// Matches the `txn_id` sent by the request. Please see [`Request::txn_id`].
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub txn_id: Option<String>,
|
||||||
|
|
||||||
/// The token to supply in the `pos` param of the next `/sync` request.
|
/// The token to supply in the `pos` param of the next `/sync` request.
|
||||||
pub pos: String,
|
pub pos: String,
|
||||||
|
|
||||||
@ -142,6 +146,7 @@ impl Response {
|
|||||||
pub fn new(pos: String) -> Self {
|
pub fn new(pos: String) -> Self {
|
||||||
Self {
|
Self {
|
||||||
initial: Default::default(),
|
initial: Default::default(),
|
||||||
|
txn_id: None,
|
||||||
pos,
|
pos,
|
||||||
delta_token: Default::default(),
|
delta_token: Default::default(),
|
||||||
lists: Default::default(),
|
lists: Default::default(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user