sendReadReceiptMessage static method

Future<void> sendReadReceiptMessage(
  1. int conversationType,
  2. String targetId,
  3. int timestamp,
  4. dynamic finished(
    1. int? code
    )?,
)

发送某个会话中消息阅读的回执

conversationType 会话类型,参见枚举 RCConversationType

targetId 会话 id

timestamp 该会话已阅读的最后一条消息的发送时间戳

finished 回调结果,code 为 0 代表操作成功,其他值代表失败 此接口只支持单聊

Implementation

static Future<void> sendReadReceiptMessage(int conversationType, String targetId, int timestamp, Function(int? code)? finished) async {
  Map map = {"conversationType": conversationType, "targetId": targetId, "timestamp": timestamp};

  Map result = await _channel.invokeMethod(RCMethodKey.SendReadReceiptMessage, map);
  int? code = result["code"];
  if (finished != null) {
    finished(code);
  }
}