mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-05-02 11:32:35 +02:00
DM delivery status was lost when switching conversations because _confirm_delivery() only stored the ACK record and emitted a socket event, but never set delivery_status='delivered' in direct_messages. During retries, each attempt generates a new ACK code. The DM record stores the initial expected_ack, but the actual ACK may arrive for a later retry's code. The ACK lookup by expected_ack then fails to match. Now _confirm_delivery() also sets delivery_status='delivered', and message loading checks this DB field first (like it already did for 'failed'), so delivery persists across page navigations. Also fixed 213 existing DMs on server via data migration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>