V2TimMessageReceipt.fromJson constructor

V2TimMessageReceipt.fromJson(
  1. Map json
)

Implementation

V2TimMessageReceipt.fromJson(Map json) {
  json = Utils.formatJson(json);
  userID = '';
  groupID = null;
  var convType = json['msg_receipt_conv_type'];
  if (convType == TIMConvType.kTIMConv_C2C.value) {
    userID = json['msg_receipt_conv_id'] ?? "";
  } else if (convType == TIMConvType.kTIMConv_Group.value) {
    groupID = json['msg_receipt_conv_id'];
  }
  timestamp = json['msg_receipt_time_stamp'] ?? 0;
  msgID = json['msg_receipt_msg_id'];
  readCount = json['msg_receipt_read_count'];
  unreadCount = json['msg_receipt_unread_count'];
  isPeerRead = json["msg_receipt_is_peer_read"];
}