deleteMessagesBefore method
- 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 ChatError. ~end
~chinese 根据时间删除本地消息。
Param timestamp
指定的Unix时间戳(毫秒)。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。 ~end
Implementation
Future<void> deleteMessagesBefore(int timestamp) async {
Map result = await ChatChannel.invokeMethod(
ChatMethodKeys.deleteMessagesBeforeTimestamp, {"timestamp": timestamp});
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}