client-api: Remove direct association between transaction ID and access token

This commit is contained in:
Kévin Commaille 2022-10-01 16:44:14 +02:00 committed by Kévin Commaille
parent c7caf65f65
commit a7e10770fa
3 changed files with 23 additions and 6 deletions

View File

@ -36,9 +36,13 @@ pub mod v3 {
/// The transaction ID for this event.
///
/// Clients should generate an ID unique across requests with the
/// same access token; it will be used by the server to ensure
/// idempotency of requests.
/// Clients should generate a unique ID across requests within the
/// same session. A session is identified by an access token, and
/// persists when the [access token is refreshed].
///
/// It will be used by the server to ensure idempotency of requests.
///
/// [access token is refreshed]: https://spec.matrix.org/v1.4/client-server-api/#refreshing-access-tokens
#[ruma_api(path)]
pub txn_id: &'a TransactionId,

View File

@ -30,8 +30,13 @@ pub mod v3 {
/// The transaction ID for this event.
///
/// Clients should generate a unique ID; it will be used by the server to ensure idempotency
/// of requests.
/// Clients should generate a unique ID across requests within the
/// same session. A session is identified by an access token, and
/// persists when the [access token is refreshed].
///
/// It will be used by the server to ensure idempotency of requests.
///
/// [access token is refreshed]: https://spec.matrix.org/v1.4/client-server-api/#refreshing-access-tokens
#[ruma_api(path)]
pub txn_id: &'a TransactionId,

View File

@ -29,7 +29,15 @@ pub mod v3 {
#[ruma_api(path)]
pub event_type: &'a str,
/// A request identifier unique to the access token used to send the request.
/// The transaction ID for this event.
///
/// Clients should generate a unique ID across requests within the
/// same session. A session is identified by an access token, and
/// persists when the [access token is refreshed].
///
/// It will be used by the server to ensure idempotency of requests.
///
/// [access token is refreshed]: https://spec.matrix.org/v1.4/client-server-api/#refreshing-access-tokens
#[ruma_api(path)]
pub txn_id: &'a TransactionId,