handle receipt updates properly #9

Merged
andrielfr merged 1 commit from fix/wrong-receipt into master 2026-03-26 23:53:39 -03:00
Member

summary:
fixes receipt handling to properly convert WhatsApp receipt types to message statuses.

changes;

  • rename ReadReceipts to ReceiptUpdate: now includes receipt_type field for proper handling
  • add TryFrom<ReceiptType> conversion: maps WhatsApp receipt types to MessageStatus:
    • Read / ReadSelf → Status::Read
    • Played / PlayedSelf → Status::Played (new)
    • Delivery → Status::Delivered
    • Sender → Status::Sent
    • Retry / ServerError → Status::Failed
  • add Played status: new status variant for media playback receipts
  • fix SQL query: update status value from 4 to 5 for marking chats as read
summary: fixes receipt handling to properly convert WhatsApp receipt types to message statuses. changes; - rename `ReadReceipts` to `ReceiptUpdate`: now includes receipt_type field for proper handling - add `TryFrom<ReceiptType>` conversion: maps WhatsApp receipt types to `MessageStatus`: - Read / ReadSelf → `Status::Read` - Played / PlayedSelf → `Status::Played` (new) - Delivery → `Status::Delivered` - Sender → `Status::Sent` - Retry / ServerError → `Status::Failed` - add `Played` status: new status variant for media playback receipts - fix SQL query: update status value from 4 to 5 for marking chats as read
- rename ReadReceipts to ReceiptUpdate to include receipt_type
- add TryFrom<ReceiptType> for converting receipt types to MessageStatus
- add Played status for media playback receipts
- update SQL query to check for status 5 for marking as read
andrielfr merged commit a28a2cb06d into master 2026-03-26 23:53:39 -03:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AmanoTeam/Papo!9
No description provided.