Cometchat.markAsRead Android error

Hey,

I got an error when I try to set CometChat.markAsRead(message.getId(),message.getReceiverUid(),CometChatConstants.RECEIVER_TYPE_GROUP);

I use the Android SDK.

My App id: 1271128b51b03c9

Others users receive Read receipts in realtime but it seems like get read status does not get saved in the database.

Because I call the function on this message: TextMessage{text=‘na’, id=3019, muid=‘null’, sender=User{uid=‘4’, name=‘josef’, avatar=‘https://www.pumpeye.de/files/images/profilepic/9fe9683c7808c7b3934d41df34a54b3317f31dc611e84c546bd6e072a94c84ae.jpeg’, link=‘null’, role=‘default’, metadata=null, status=‘online’, statusMessage=‘null’, lastActiveAt=1598107467, hasBlockedMe=false, blockedByMe=false}, receiverUid=‘162’, type=‘text’, receiverType=‘group’, category=‘message’, sentAt=1598107472, deliveredAt=0, readAt=0, metadata={"@injected":{“extensions”:{“profanity-filter”:{“code”:“ERR_NO_SETTINGS”,“message”:“Settings not found”}}}}, readByMeAt=0, deliveredToMeAt=0, deletedAt=0, editedAt=0, deletedBy=‘null’, editedBy=‘null’, updatedAt=1598107472}

And after I called CometChat.markAsRead(3019,162, CometChatConstants.RECEIVER_TYPE_GROUP);

I still retrieve the same message:

TextMessage{text=‘na’, id=3019, muid=‘null’, sender=User{uid=‘4’, name=‘josef’, avatar=‘https://www.pumpeye.de/files/images/profilepic/9fe9683c7808c7b3934d41df34a54b3317f31dc611e84c546bd6e072a94c84ae.jpeg’, link=‘null’, role=‘default’, metadata=null, status=‘online’, statusMessage=‘null’, lastActiveAt=1598107467, hasBlockedMe=false, blockedByMe=false}, receiverUid=‘162’, type=‘text’, receiverType=‘group’, category=‘message’, sentAt=1598107472, deliveredAt=0, readAt=0, metadata={"@injected":{“extensions”:{“profanity-filter”:{“code”:“ERR_NO_SETTINGS”,“message”:“Settings not found”}}}}, readByMeAt=0, deliveredToMeAt=0, deletedAt=0, editedAt=0, deletedBy=‘null’, editedBy=‘null’, updatedAt=1598107472}

So your databse was not updated to a read message.

I called this function when I have a Wifi Connection, because it was called inside of a messagerequest.

This error only happens in groups. With users the same works fine.

So what did I wrong or is this a bug?

Best regards,

Florian Senf

Hello @floriansenf
As mentioned on the dashboard chat, the messages for group are only marked as read when every member of the group has read the message. We have also forwarded you request for a real-time event for message being read by all members in the group. You will be informed via email when we decide to take this up and release it.

Thanks

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.