getMessageReadReceipt method

V2TimMessageReceipt getMessageReadReceipt({
  1. required String msgID,
  2. required String userID,
  3. required int timestamp,
})

function for getting message read Receipt msgID (required) message ID userID (required) user ID timestamp (required) timestamp returns V2TimMessageReceipt as a result

Implementation

V2TimMessageReceipt getMessageReadReceipt({
  required String msgID,
  required String userID,
  required int timestamp,
}) {
  return _messageReadReceiptMap.putIfAbsent(
    msgID,
    () => V2TimMessageReceipt(
      userID: userID,
      timestamp: timestamp,
      readCount: 0,
      unreadCount: 1,
    ),
  );
}