From bd9348101333894e5086b7218a773c9c8f4c471e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 29 Aug 2018 23:18:10 -0600 Subject: [PATCH 1/2] Reference that transaction IDs may be used to echo Fixes https://github.com/matrix-org/matrix-doc/issues/1462 --- specification/modules/instant_messaging.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/specification/modules/instant_messaging.rst b/specification/modules/instant_messaging.rst index 079a4801..f96a4326 100644 --- a/specification/modules/instant_messaging.rst +++ b/specification/modules/instant_messaging.rst @@ -167,9 +167,14 @@ message which they receive from the event stream. The echo of the same message from the event stream is referred to as "remote echo". Both echoes need to be identified as the same message in order to prevent duplicate messages being displayed. Ideally this pairing would occur transparently to the user: the UI -would not flicker as it transitions from local to remote. Flickering cannot be -fully avoided in the current client-server API. Two scenarios need to be -considered: +would not flicker as it transitions from local to remote. Flickering can be +reduced through clients making use of the transaction ID they used to send +a particular event. The transaction ID used will be included in the event's +``unsigned`` data as ``transaction_id`` when it arrives through the event stream. + +Clients unable to make use of the transaction ID are more likely to experience +flickering due to the following two scenarios, however the effect can be mitigated +to a degree: - The client sends a message and the remote echo arrives on the event stream *after* the request to send the message completes. From 3d99c8b5a8344523af29791e374908227da3692f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 29 Aug 2018 23:19:18 -0600 Subject: [PATCH 2/2] Changelog --- changelogs/client_server/newsfragments/1619.clarification | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/client_server/newsfragments/1619.clarification diff --git a/changelogs/client_server/newsfragments/1619.clarification b/changelogs/client_server/newsfragments/1619.clarification new file mode 100644 index 00000000..fa06e969 --- /dev/null +++ b/changelogs/client_server/newsfragments/1619.clarification @@ -0,0 +1 @@ +Add a note that clients may use the transaction ID to avoid flickering when doing local echo.