From 7c6506249711b07018dd6cd00935ddc2b50b6d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= Date: Mon, 21 Sep 2020 16:01:00 -0400 Subject: [PATCH] Update 6.2. Sync Protocol --- technical/6.2.-Sync-Protocol.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/technical/6.2.-Sync-Protocol.md b/technical/6.2.-Sync-Protocol.md index f165ddf3..be3f8fef 100644 --- a/technical/6.2.-Sync-Protocol.md +++ b/technical/6.2.-Sync-Protocol.md @@ -24,6 +24,8 @@ Now, this is the scenario used to sync: + Add contacts if it detects added contacts + Remove conversations if it detects removed conversations + Add conversations if it detects added conversations + + Remove conversation's requests if request is accepted (now in conversations)/declined + + Add conversation's requests if detected Note: If *A* detects new conversations, it will asks the device which announced that conversation to clone the repository through a git channel (so like described in [Swarm chat design](https://git.jami.net/savoirfairelinux/ring-project/wikis/Group-chat-feature-(design-draft))) @@ -36,7 +38,13 @@ This value is a JSON containing: "conversation": [ { "id":"convID", "created":TIMESTAMP, "removed":OPTIONAL_TIMESTAMP }, { "id":"convID2", "created":TIMESTAMP2, "removed":OPTIONAL_TIMESTAMP2 } /* ... */ - ] + ], + "conversationsRequests": [ + { "id":"convID", "received":TIMESTAMP, "declined":OPTIONAL_TIMESTAMP, + "members":[], "metadatas:[] }, + { "id":"convID2", "received":TIMESTAMP2, "declined":OPTIONAL_TIMESTAMP2 + "members":[], "metadatas:[] } /* ... */ + ], } ``` @@ -62,6 +70,24 @@ This value is a JSON containing: + Alice creates a conversation + The other device should receives and sync the conversation created on one of the devices +## Sync for detecting new requests + ++ Alice receives a conversation's request ++ Alice add a new device ++ The other device should retrieve the requests from device A + +## Sync for accepted requests + ++ Alice has 2 devices ++ Alice accepts a conversation's request ++ The other device should detect the accepted request + +## Sync for decline requests + ++ Alice has 2 devices ++ Alice declines a conversation's request ++ The other device should detect the declined request + # Current implementation https://review.jami.net/c/ring-daemon/+/15584 implements this page \ No newline at end of file