From ed08c1cb9eee78ee20ee71095da02c5c6d5b5f65 Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Tue, 31 Aug 2021 15:50:38 +0000 Subject: [PATCH] Tweak PDU diagram demonstrating `prev_events`. (#3340) This tweaks the DAG to be simpler, with two linear event chains E4 -> E3 -> E2 -> E1 and E6 -> E5 -> E2 -> E1. The extremities of the DAG are now the first and only point in the DAG where multiple event parents occur. Since the point of the diagram is to demonstrate this very situation, it's better didactically if there is only one such situation in the diagram. --- .../server_server/newsfragments/3340.clarification | 1 + content/server-server-api.md | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 changelogs/server_server/newsfragments/3340.clarification diff --git a/changelogs/server_server/newsfragments/3340.clarification b/changelogs/server_server/newsfragments/3340.clarification new file mode 100644 index 00000000..8128a223 --- /dev/null +++ b/changelogs/server_server/newsfragments/3340.clarification @@ -0,0 +1 @@ +Tweak the example PDU diagram to better demonstrate situations with multiple `prev_events`. diff --git a/content/server-server-api.md b/content/server-server-api.md index 763c0e68..9c6552ab 100644 --- a/content/server-server-api.md +++ b/content/server-server-api.md @@ -333,15 +333,16 @@ after all other known events. For example, consider a room whose events form the DAG shown below. A server creating a new event in this room should populate the new event's -`prev_events` field with `E4` and `E5`, since neither event yet has a -child: +`prev_events` field with both `E4` and `E6`, since neither event yet has +a child: E1 ^ | - +-> E2 <-+ - | | - E3 E5 + E2 <--- E5 + ^ ^ + | | + E3 E6 ^ | E4