Skip to content

Message delivery states

The idea is to track message delivery state. Message Delivery state can be

  • Pending (when message wasn't successfully sent)
  • Sent (when it was successfully transferred to the server)
  • Delivered (when it was delivered to the chat partner)
  • Error (when something went wrong)

Later we might also add some abstraction like "Read", when the message was read by the recipient.

I'm planing to do specific context actions upon delivery state, like pending message can be cancelled, or error message can be resent but can't be edited.

I believe this way I also can solve Issue 304 about offline message queue. Here are some thoughts of how it could be done

When the disconnect happens I could consider all pending messages as error for the user to decide whether he wants to try to send them again later. Or I can write down their IDs to some separate table and try to send them later upon successful connection. Or I could combine those ways like with some retries of sending messages in pending state and if any of those retries were successful consider message as an error.

I hope you'll help me with the choice of strategy =)

Closes #304 (closed)

Edited by Melvin Keskin

Merge request reports

Loading