syncConversationReadStatus static method

Future<void> syncConversationReadStatus(
  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> syncConversationReadStatus(int conversationType, String targetId, int timestamp, Function(int? code)? finished) async {
  Map map = {"conversationType": conversationType, "targetId": targetId, "timestamp": timestamp};

  int? result = await _channel.invokeMethod(RCMethodKey.SyncConversationReadStatus, map);
  if (finished != null) {
    finished(result);
  }
}