From 86002efed58bd199bed7f78161cc6941867b8dde Mon Sep 17 00:00:00 2001 From: Ivana Date: Wed, 23 Mar 2022 09:58:11 +0000 Subject: [PATCH] Update messages uploaded to mailbox correctly --- messages-uploaded-to-mailbox-correctly.md | 78 ++++++++++++++++++++++- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/messages-uploaded-to-mailbox-correctly.md b/messages-uploaded-to-mailbox-correctly.md index fd85441..74a0779 100644 --- a/messages-uploaded-to-mailbox-correctly.md +++ b/messages-uploaded-to-mailbox-correctly.md @@ -15,12 +15,84 @@ Once the recipient's Briar app received a message from their own or from the con Scenarios: +**Scenario 1** + | sender | online | has mailbox | maibox online | recipient | online | has mailbox | maibox online | | ------ | ------ | ------ | ------ | ------ | ------ |------ | ------ | | ------ | yes | yes | yes | ---- | no | no | na | -| ------ | yes | yes | no | ---- | no | no | na | -| ------ | yes | yes | no | ---- | no | yes| yes | -| ------ | yes | no | na | ------ | no |yes | yes| + + +- the sender is online, they have a mailbox on a device that is also online. +- The recipient is offline and they don't have a mailbox app. +- The sender's message will be uploaded to their own mailbox, and at this point the sent message has one tick +- When the intended recipient comes online, the mailbox will forward them the message. Recipient's briar app will generate the ack, and the sender will see two ticks on the sent message. + +**Scenario 2** + +| sender | online | has mailbox | maibox online | recipient | online | has mailbox | maibox online | | ------ | ------ | ------ | ------ | ------ | ------ |------ | ------ | +| ------ | yes | yes | no | ---- | no | no | na | + +- This is a scenario where the sender has a mailbox app on another device, but that device is not initially online. +- the recipient is offline and they don't have the mailbox installed +- sender wants to send a message to their contact who is offline, and as their mailbox is offline too, the message will just have a 'clock' icon, meaning, it has not been sent yet +- then the sender's mailbox app comes online, and the message to the recipient is upoaded onto the sender's mailox (recipient is still offline at this point). +- the message gets 'one tick' +- now the sender goes offline +- Then the recipient comes online, and they receive the message from the sender's mailbox (for the recipient, this is transparent, it is like any other message they receive from the sender, they don't know necesarily that this message has passed via mailbox) +- The recipient's Briar app will generate and send the ack, which will be uploaded to the sender's mailbox +- recipient goes offline +- Sender comes back online, and receives the ack from the recipient's briar app, which has passed on to them vai sender's own mailbox +- message in Briar app gets the second tick +- recipient comes online - so both sender and recipient are now online, as is the sender's mailbox. +- recipient now sends a reply message to the original sender. +- their message arrives to the sender, whose briar app generates an immediate ack, and the reply message sent from recipient's briar app gets two ticks. +- mailbox goes offline +- sender replies to the reply they received, and the recipient receives it in a normal way + +**Scenario 3** + +| sender | online | has mailbox | maibox online | recipient | online | has mailbox | maibox online | +| ------ | ------ | ------ | ------ | ------ | ------ |------ | ------ | +| ------ | yes | yes | yes | ---- | no | yes| yes | + +- This is a scenario where both the sender and the recipient have the mailbox app installed and paired with Briar, and both mailboxes are online at the same time. +- initially, the sender is online +- initially, the recipient is offline +- sender sends a message to their contact who is offline +- this message is uploaded to their own mailbox (and not the recipient's) - **TBD how to verify this. ** +- sender goes offline +- When the recipient comes online, they receive the message from sender's mailbox +- Recipient's briar app generates ask and uploads it to their own mailbox **TBD how to verify this?** +- recipient goes offline +- sender comes online, and they receive the ack from the recipient's mailbox +- sender's initial message gets the second tick +- sender goes offline +- recipient comes online and sends a reply message to the sender +- this reply message gets uploaded to their mailbox +- recipient goes offline +- when the sender gets back online they receive a message via recipient's mailbox +- recipient's mailbox now goes offline +- sender's briar app generates an ack and uploads it to their own mailbox +- sender goes offline +- recipient comes online +- recipient receives the message via sender's mailbox +- recipient's briar app generates an ack, and uploads it to the sender's mailbox (as their own is offline now) +- recipient goes offline +- sender receives the ack from recipient, via sender's mailbox +- recipient's mailbox comes online +- sender's mailbox goes offline +- sender sends the message to their contact who is offline +- message is uploaded to the recipient's mailbox (as the sender's mailbox is now offlie) **TBD question in MM** 23/3 +- Recipient is offline, but they come in physical contact with the sender, and the same message that was uploaded to their mailbox is now delivered straight to their briar app from teh sender's briar app +- recipient's briar app generates the ack and the message receives the second tick on the sender's briar app +- recipient now switches the BT off, and goes online, and DOES NOT receive the same message from their mailbox +- TBD what happens to the messages upoaded into the mailbox, but that get delivered directly to the briar app via BT? for example. Do those messages get purged from mailbox? + + +| sender | online | has mailbox | maibox online | recipient | online | has mailbox | maibox online | +| ------ | ------ | ------ | ------ | ------ | ------ |------ | ------ | +| ------ | yes | no | na | ------ | no |yes | yes| + [Back to Testing](https://code.briarproject.org/briar/briar/-/wikis/Testing)