From 45efedea0a375b7122601e7b232d6a32f6c7dc8a Mon Sep 17 00:00:00 2001 From: Ivana Date: Fri, 25 Mar 2022 10:05:55 +0000 Subject: [PATCH] Update messages uploaded to mailbox correctly --- messages-uploaded-to-mailbox-correctly.md | 95 ++++++++++++++--------- 1 file changed, 58 insertions(+), 37 deletions(-) diff --git a/messages-uploaded-to-mailbox-correctly.md b/messages-uploaded-to-mailbox-correctly.md index 3cc0a0b..e167e0f 100644 --- a/messages-uploaded-to-mailbox-correctly.md +++ b/messages-uploaded-to-mailbox-correctly.md @@ -1,17 +1,33 @@ -Mialbox screens do not show any messages, therefore the user cannot know if their messages were correctly uploaded or not. For the user, that is all black box. +THESE SCENARIOS CAN BE REPEATED FOR DIFFERENT TYPES OF MESSAGES/ -For testing purposes, though, it should be possible to verify this by looking into a logfile of some kind. -It would be good if this logfile also shows the acknowledgements that the Mailbox sends to Briar. +- TEXT +- ATTACHMENT +- PROFILE PICTURES +- PRIVATE GROUPS +- BLOGS +- FORUMS +- IMPORT RSS +- INTRODUCTIONS +- EXPORTED TO REMOVABLE MEDIA -In Briar, the messages uploaded to Mailbox (either own or the contact's) will show only as sent messages. For the user, this will be identical to messages being exported via removable media, ie they will have 'one tick'. +AND FOR DIFFERENT DEVICES HAVING THE MAILBOX INSTALLED AND PAIRED WITH BRIAR APP ON OTHER DEVICES + +Mailbox screens do not show any messages, therefore the user cannot know if their messages were correctly uploaded or not. For the user, that is all black box. + +For testing purposes, though, it should be possible to verify this by looking into a logfile of some kind, or querying the db. + + +In Briar, the messages uploaded to Mailbox will show only as sent messages. For the user, this will be identical to messages being exported via removable media, ie they will have 'one tick'. + +OUtgoing messages are always uploaded to own mailbox. If own mailbox is not available (is offline for soem reason) then the messages will simply wait (and not look for the contacts' mailboxes) This phase is also present when messages are sent directly to the contact who is online, but it is too brief to be seen by naked eye. In this case the contact's Briar app sends the ack immediately, and at this point the sent messages on the senders Briar app show 'two ticks'. -When the contact comes online, the Mailbox will notice and forward them the messages it has uploaded earlier. At this point, there is still no change in the message status on the sender's screen, it still has only one tick. So the sender will not know when the message is forwarded from Mailbox to the intended recipient, nor whether it was done via own mailbox or the recipient's. +When the contact comes online, the Mailbox will notice and forward them the messages it has uploaded earlier. At this point, there is still no change in the message status on the sender's screen, it still has only one tick. So the sender will not know when the message is forwarded from Mailbox to the intended recipient. -Once the recipient's Briar app received a message from their own or from the contact's mailbox, their Briar app will send the ack -- directly to contact if their contact is online, and at this point the sender will see their sent message get the second 'tick' -- via own or contact's mailbox. +Once the recipient's Briar app received a message from the sender's mailbox, their Briar app will send the ack +- directly to sender if that sender is online, and at this point the sender will see their sent message get the second 'tick' +- via own mailbox. Scenarios: @@ -21,11 +37,17 @@ Scenarios: | ------ | ------ | ------ | ------ | ------ | ------ |------ | ------ | | ------ | yes | yes | yes | ---- | no | no | na | - +**scenario 1A** - 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. +- When the intended recipient comes online, the mailbox will forward them the message. +- Recipient's briar app will generate the ack, and if the sender is online they will see two ticks on the message that they sent to recipient. +**scenario 1B** +- Another possibility is if the sender is offline when the recipient generates the ack - this can be achieved after the message has been uploaded to the mailbox, but before the recipient comes online. In this case, only the device with sender's mailbox is online at one time. +- Then the recipient comes online and receives the sender's message. +- Their briar app generates the ack. As the sender is offline at present, that ack will simply wait for the sender to come online and will be sent when that happens. +- When the sender comes online, they receive the ack from the recipient (who needs to be online at the same time) **Scenario 2** @@ -34,17 +56,22 @@ Scenarios: | ------ | 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. +**Scenario 2A** - 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. +- The recipient's Briar app will generate and send the ack +- this ack will be received by the sender when they come online again. + +**Scenario 2B** + +- Similar scenario, but the recipient comes online before the sender's mailbox does. +- As soon as both the sender and recipient are online, the messages are exchanged between them direclty, without passing through mailbox. **To be confirmed in MM 25/03** + +- message in sender's Briar app gets the second tick - 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 @@ -60,34 +87,26 @@ Scenarios: - 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 +- this message is uploaded to their own mailbox (and not the recipient's) +- then 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's briar app generates ask and uploads it to their own mailbox - 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's initial message in their briar app 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 +- this reply message gets uploaded to the recipient's mailbox + - 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? +- when the sender gets back online they receive a message via recipient's mailbox + +- sender's briar app generates an ack and sends it directly to the recipient who is still online (and does not upload it to the sender's mailbox) + + + + + **Scenario 4** @@ -112,7 +131,9 @@ This is a scenario for cases where the sender doesn't have a mailbox, but the re - this message is delivered directly to the sender, without passing via recipient's mailbox - **TBD how this can be verified. Or does it even need to be verified?** - recipient who sent this message gets an immediate double tick in the briar app for that message +**Scenario 5** +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? [Back to Testing](https://code.briarproject.org/briar/briar/-/wikis/Testing)