mattermost-mobile-upstream/app/database
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
..
components Mm 68767 zero persistence (#9803) 2026-07-16 13:55:45 +02:00
exceptions [Gekidou] operator handlers improvements (#6136) 2022-04-07 09:17:57 -04:00
manager Mm 68767 zero persistence (#9803) 2026-07-16 13:55:45 +02:00
migration Add BoardView, PropertyField, PropertyValue WatermelonDB tables (#9708) 2026-06-01 12:46:40 +02:00
models Add BoardView, PropertyField, PropertyValue WatermelonDB tables (#9708) 2026-06-01 12:46:40 +02:00
operator Ignore deleted posts in SINCE/BEFORE/NEW PostsInChannel handlers (MM-66467) 2026-07-31 19:24:46 +00:00
recovery [MM-68315] Add autorecovery for database corruptions (#9900) 2026-07-13 18:02:35 +02:00
schema Add BoardView, PropertyField, PropertyValue WatermelonDB tables (#9708) 2026-06-01 12:46:40 +02:00
subscription Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00