mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-20 18:38:14 +00:00
Generic relation/cache cleanup must never silently discard durable draft sync intent. Strip drafts from every generic cascade and remove clean reply drafts only at the confirmed-server-post-deletion origin. - prepareDeletePost: drop post.drafts from the cascade. - prepareDeleteChannel: drop channel.drafts from the cascade (channel delete/leave/purge now preserves Draft + DraftOutbox). - deletePosts: drop the DELETE FROM Draft SQL (data-retention eviction preserves drafts + outbox). - Add prepareDeleteCleanReplyDrafts(database, rootIds): removes only CLEAN reply drafts (no DraftOutbox row) for confirmed-deleted roots, never enqueues a DELETE; preserves reply drafts with pending local intent (local-wins); never touches channel drafts. - Wire it into preparePostDeletion (the removePost/removePosts confirmed path). Checks: npm run tsc clean; eslint --quiet clean; 241 Jest tests pass across the post/channel/drafts query + post/draft action suites. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| ephemeral_mode | ||
| session | ||
| category.test.ts | ||
| category.ts | ||
| channel_bookmark.test.ts | ||
| channel_bookmark.ts | ||
| channel.test.ts | ||
| channel.ts | ||
| draft.test.ts | ||
| draft.ts | ||
| file.test.ts | ||
| file.ts | ||
| group.test.ts | ||
| group.ts | ||
| post.test.ts | ||
| post.ts | ||
| reactions.test.ts | ||
| reactions.ts | ||
| scheduled_post.test.ts | ||
| scheduled_post.ts | ||
| systems.test.ts | ||
| systems.ts | ||
| team.test.ts | ||
| team.ts | ||
| thread.test.ts | ||
| thread.ts | ||
| user.test.ts | ||
| user.ts | ||