Hi CometChat,
I have been using your product for while, And now I’m facing an issue with the markAsRead function.
It was working fine previously but now for the past two weeks, it’s not working as expected. I tried to debug that’s what going wrong but didn’t find anything.
Version->
“@cometchat-pro/react-native-calls”: “^2.1.1”,
“@cometchat-pro/react-native-chat”: “^2.3.4”,
if (
message.getSender().getUid() !== user.getUid() &&
!message.getReadAt()
) {
if (
message.getReceiverType() === CometChat.RECEIVER_TYPE.USER
) {
console.log(
"User--->",
message.getId().toString(),
message.getSender().getUid(),
message.getReceiverType()
);
try {
CometChat.markAsRead(
message.getId().toString(),
message.getSender().getUid(),
message.getReceiverType()
);
} catch (e) {
console.log("Error--->", e);
}
} else if (
message.getReceiverType() === CometChat.RECEIVER_TYPE.GROUP
) {
console.log(
"Group--->",
message.getId().toString(),
message.getReceiverId(),
message.getReceiverType()
);
try {
CometChat.markAsRead(
message.getId().toString(),
message.getReceiverId(),
message.getReceiverType()
);
} catch (e) {
console.log("Error--->", e);
}
}
}
I have also checked for the connection status and it is showing “connected”.
Please let me know what could be the possible issue.
Thanks
Avi Choudhary