cleanConversationUnreadMessageCount method
Future<V2TimCallback>
cleanConversationUnreadMessageCount(
{ - required String conversationID,
- required int cleanTimestamp,
- required int cleanSequence,
})
override
Implementation
@override
Future<V2TimCallback> cleanConversationUnreadMessageCount({
required String conversationID,
required int cleanTimestamp,
required int cleanSequence,
}) async {
if (conversationID.toLowerCase().startsWith("c2c")) {
return await _v2timMessageManager.markC2CMessageAsRead({
"userID": conversationID.replaceFirst("c2c_", ""),
});
} else if (conversationID.startsWith("group")) {
return await _v2timMessageManager.markGroupMessageAsRead({
"groupID": conversationID.replaceFirst("group_", ""),
});
} else {
return V2TimCallback.fromJson({'code': -1, "desc": "conversationID format error"});
}
}