core icon indicating copy to clipboard operation
core copied to clipboard

fix: Order of messages if outgoing reply is received earlier (#7169)

Open iequidoo opened this issue 4 months ago • 0 comments

Based on #7312 . Replacement for #7177 . The third try %) Fix #7169

This fixes a scenario when an outgoing reply is received earlier than an incoming message for some reason like device B having MvboxMove enabled, sending the reply and going offline immediately, so the reply is in Inbox and it's processed by device A earlier because e.g. MvboxMove is disabled on it. Also if we add multi-transport later, this scenario will be just normal.

This allows received outgoing messages to mingle with fresh incoming ones, i.e. sorts them together purely by timestamp by assigning InFresh state to received outgoing messages, but still returning OutDelivered by all APIs for compatibility. NB: We already do such a trick for OutMdnRcvd.

As for messages sent locally, there's no need to make them more noticeable even if they are newer, so received outgoing messages are always added after them.

iequidoo avatar Sep 11 '25 09:09 iequidoo