From 5df86dabe0f58f8552a6c5f0839664b547bd6045 Mon Sep 17 00:00:00 2001 From: Jimmy Cuadra Date: Tue, 9 Jul 2019 01:12:07 -0700 Subject: [PATCH 1/2] Clarify the purpose of reference hashes. The server-server specification describes a "reference hash" of an event and how to calculate it, but is otherwise not mentioned anywhere else in the document. This change adds a sentence to explain that they are used for event identifiers in later room versions, which are described in other documents. Signed-off-by: Jimmy Cuadra --- changelogs/server_server/newsfragments/2159.clarification | 1 + specification/server_server_api.rst | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/server_server/newsfragments/2159.clarification diff --git a/changelogs/server_server/newsfragments/2159.clarification b/changelogs/server_server/newsfragments/2159.clarification new file mode 100644 index 00000000..d7b79ccf --- /dev/null +++ b/changelogs/server_server/newsfragments/2159.clarification @@ -0,0 +1 @@ +Clarify the purpose of reference hashes. diff --git a/specification/server_server_api.rst b/specification/server_server_api.rst index 03c624ab..2e96dc85 100644 --- a/specification/server_server_api.rst +++ b/specification/server_server_api.rst @@ -1134,7 +1134,8 @@ Calculating the reference hash for an event ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The *reference hash* of an event covers the essential fields of an event, -including content hashes. It is calculated as follows. +including content hashes. It is used for event identifiers in room versions 3 and +higher. It is calculated as follows. 1. The event is put through the redaction algorithm. From a3d2d14dae745b5460809b62b1fa46027154ae90 Mon Sep 17 00:00:00 2001 From: Jimmy Cuadra Date: Tue, 9 Jul 2019 15:25:23 -0700 Subject: [PATCH 2/2] Rephrase explanation of the purpose of reference hashes and link to the room version spec. Signed-off-by: Jimmy Cuadra --- specification/server_server_api.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/server_server_api.rst b/specification/server_server_api.rst index 2e96dc85..62f6916a 100644 --- a/specification/server_server_api.rst +++ b/specification/server_server_api.rst @@ -1134,8 +1134,9 @@ Calculating the reference hash for an event ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The *reference hash* of an event covers the essential fields of an event, -including content hashes. It is used for event identifiers in room versions 3 and -higher. It is calculated as follows. +including content hashes. It is used for event identifiers in some room versions. +See the `room version specification`_ for more information. It is calculated as +follows. 1. The event is put through the redaction algorithm.