feat: implement automatic message delivery acknowledgement to trigger real-time double-tick status updates

This commit is contained in:
pradeepkumar
2026-04-07 19:53:12 +05:30
parent 2913947a34
commit 821e1a0689
2 changed files with 21 additions and 0 deletions

View File

@@ -106,6 +106,10 @@ class MessagingNotifier extends StateNotifier<MessagingState> {
final isMine = message.senderId == _currentUserId;
if (isMine) return;
// Immediately ack delivery to backend so sender's tick goes single → double.
// This works regardless of Redis presence state and avoids races on send.
_socket.ackMessageReceived(convId, message.id);
currentMessages.insert(0, message);
final updatedMessages =
Map<String, List<ChatMessage>>.from(state.messages)