deleteMessagesBefore method
- int timestamp
~english Deletes messages with the 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 {
try {
Map result = await Client.instance.chatManager.callNativeMethod(
ChatMethodKeys.deleteMessagesBeforeTimestamp,
{"timestamp": timestamp});
EMError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}