deleteMessagesBefore method

Future<void> deleteMessagesBefore(
  1. int timestamp
)

根据时间删除本地消息。

Param timestamp 指定的Unix时间戳(毫秒)。

Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError

Implementation

Future<void> deleteMessagesBefore(int timestamp) async {
  Map result = await ChatChannel.invokeMethod(
      ChatMethodKeys.deleteMessagesBeforeTimestamp, {"timestamp": timestamp});
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}