Update Self destructing messages

Ivana
2021-03-04 13:15:48 +00:00
parent c7b719c8b5
commit fe8a9f5154

@@ -69,6 +69,32 @@ Preconditions:
- [ ] Device1 setting 'disappearing messages' has been turned 'on' when they received the device2 disappearing message.
- [ ] When device1 tries to send the message they were composing, they receive the same warning as did device2 when they changed this setting in the middle of composing the message: Disappearing messages changed. Since you started composing your message, disappearing messages have changed'. ON this warning message, options for the user are: 'send anyway' and 'cancel'.
**#1833 Delete messages when their self-destruct timers expire**
Create a component that tracks pending self-destruct timers and deletes messages when their self-destruct timers expire.
Conversation clients will register messages for deletion during delivery. The new component will be responsible for calling back into the client when a message is due to be deleted. This will allow the client to take any necessary steps before deletion, such as declining an open introduction.
**MR 1312 Mirror the contact's changes to the self-destruct timer**
This branch records the self-destruct timer from incoming messages and updates the local timer to match the remote timer when appropriate:
* If the incoming message has an earlier or equal timestamp to the latest message sent or received so far, we don't update our timer
* If we haven't changed the local timer since sending our last message, we mirror the remote timer
* If we have changed the local timer since sending our last message, we only mirror the remote timer if it has changed; messages that continue to use the old timer don't overwrite our local change
**Test specification**
For the incoming message to have an earlier timestamp than the latest message we sent or received, there would have to be a delay in the message delivery - how to simulate that?
* If we haven't changed the local timer since sending our last message, we mirror the remote timer
To test this scenario:
- [ ] device 1 has their Disappearing messages setting set to On. The remote device2 has their Disappearing setting set to Off.
- [ ] device2 sends device1 a message.
- [ ] device1 receives message, together with the automatically generated messages informing them that the message they just received is not going to be seld-destucted.