mattermost-mobile-upstream/app/database/operator
Cursor Agent 28d5f97cdb
Ignore deleted posts in SINCE/BEFORE/NEW PostsInChannel handlers (MM-66467)
The MM-66467 fix filtered delete_at !== 0 posts out of interval math in
handleReceivedPostsInChannel only. The three sibling handlers still build
PostsInChannel intervals from raw posts, so a batch made up entirely of
deleted posts (getPostsSince returns deleted posts) can still create a
zero-row interval when the channel has none, or stretch interval bounds to
a deleted post's create_at. A zero-row interval with the greatest `latest`
is exactly the state that renders a channel blank.

Apply the same filter to handleReceivedPostsInChannelSince,
handleReceivedPostsInChannelBefore and handleReceivedNewPostForChannel:
compute interval edges from live posts only, and skip the interval update
with a logDebug when no post in the batch survives persistence.

Regression tests reproduce each symptom against the unfixed handlers.

Co-authored-by: Jesse Hallam <lieut-data@users.noreply.github.com>
2026-07-31 19:24:46 +00:00
..
app_data_operator Add model mocks to TestHelper (#8715) 2025-03-28 09:40:08 +01:00
base_data_operator [MM-68315] Add autorecovery for database corruptions (#9900) 2026-07-13 18:02:35 +02:00
server_data_operator Ignore deleted posts in SINCE/BEFORE/NEW PostsInChannel handlers (MM-66467) 2026-07-31 19:24:46 +00:00
utils Add Playbooks read-only support for mobile devices (#8978) 2025-07-14 09:21:37 +02:00