Skip to content

Conversation

iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Sep 11, 2025

Based on #7180 . 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.

@link2xt link2xt force-pushed the iequidoo/unbend-calc_sort_timestamp branch from 462985d to 7c44f7d Compare September 12, 2025 15:10
@link2xt link2xt force-pushed the iequidoo/test_sync_sentbox_then_inbox branch from 69afdb8 to 6ffe634 Compare September 12, 2025 15:10
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.
@link2xt link2xt force-pushed the iequidoo/unbend-calc_sort_timestamp branch from 7c44f7d to dce6e5d Compare September 13, 2025 00:16
@link2xt link2xt force-pushed the iequidoo/test_sync_sentbox_then_inbox branch from 6ffe634 to 33ffb04 Compare September 13, 2025 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant