Hello,
I can send chat messages to multiple users on several devices using group channels.
When the app resumes and when a new message is received, I use channel.markAsRead();
If I put a breakpoint in that method on the line await _sdk.cmdManager.sendCommand(cmd);
I can see it triggers the breakpoint.
But onReadReceiptUpdated
is not called (or very sporadically, might as well be never) on the other devices.
onMessageReceived
does work.
My onMessageReceived
looks like this
@override
void onMessageReceived(BaseChannel channel, BaseMessage message) async {
print('NEW: ${message.message}');
_showMessage(
message.message,
types.User(id: message.sender!.userId),
id: message.messageId,
createdAt: message.createdAt,
skipState: false,
);
this.channel!.markAsRead();
}
The message is shown, so that code works, only markAsRead
is not doing anything.
I have tested on Android, iPad and web.
On Android I implemented push notifications, if I put the app in the background I get a push with the messages I missed.
Am I doing something wrong?
Thanks in advance