deleteMessagesBefore method

Future<void> deleteMessagesBefore(
  1. int timestamp
)

~english Deletes messages with timestamp that is before the specified one.

Param timestamp The specified Unix timestamp(milliseconds).

Throws A description of the exception. See EMError. ~end

~chinese 根据时间删除本地消息。

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

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

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;
  }
}