fix(engine): advance DM unread cursors on participant rows
Merged
WI
3d ago+542+542+012345678901234567890123456789-56-56-01234567890123456789
A DM participant's inbox unread count follows dm_participants.last_read_id. Marking a message read, or acknowledging its delivery, moves that cursor forward. Later inbox reads stay cleared, and an older message id does not move the cursor backward.
Channel unread still uses channel_members.last_read_id. A DM has no channel membership row, so the inbox reads the participant cursor for DMs.
Migration 0078_dm_participant_read_cursor.sql adds the nullable cursor. Existing conversations stay unread until the next mark-read or delivery acknowledgement.
Patch. No public API change.
Fixes #580
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.