Update messages uploaded to mailbox correctly

Ivana
2022-08-22 13:20:41 +00:00
parent f8bffa5ab0
commit aed948abd5

@@ -21,7 +21,7 @@ For testing purposes, though, it should be possible to verify this by looking in
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)
OUtgoing messages are always uploaded to own mailbox. If own mailbox is not available (is offline for some 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'.
@@ -29,7 +29,8 @@ When the contact comes online, the Mailbox will notice and forward them the mess
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.
- via own mailbox if they have it
- if sender is offline and no own mailbox, then the ack will simply wait and be sent when the sender becomes available online (or via BT) again.
Scenarios:
@@ -42,10 +43,11 @@ Scenarios:
**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
- The sender's message will be uploaded to their own mailbox, and at this point the sent message has one tick (this take a couple of minutes usually)
- Then the sender's device needs to be put offline, to make sure that any messages that recipient may receive come to them from the sender's mailbox and not from the sender's Briar app
- 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.