getMsgReadReceipt method

dynamic getMsgReadReceipt(
  1. List<V2TimMessage> message
)

Function for getting message read receipt

Implementation

getMsgReadReceipt(List<V2TimMessage> message) async {
  final msgIDs = message.where((e) => (e.isSelf ?? true) && (e.needReadReceipt ?? false)).map((e) => e.msgID ?? '').toList();
  if (msgIDs.isNotEmpty) {
    final res = await TencentImSDKPlugin.v2TIMManager.getMessageManager().getMessageReadReceipts(messageIDList: msgIDs);
    if (res.code == 0) {
      final receiptList = res.data;
      if (receiptList != null) {
        for (var item in receiptList) {
          _messageReadReceiptMap[item.msgID ?? ""] = item;
        }
      }
    }
    notifyListener(TencentCloudChatMessageDataKeys.messageReadReceipts as T);
  }
}