updateChatRoomAnnouncement method
~english Updates the chat room announcement.
Only the chat room owner or admin can call this method.
Param roomId
The chat room ID.
Param announcement
The announcement content.
Throws A description of the exception. See ChatError. ~end
~chinese 更新聊天室公告。
仅聊天室所有者和管理员可调用此方法。
Param roomId
聊天室 ID。
Param announcement
公告内容。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。 ~end
Implementation
Future<void> updateChatRoomAnnouncement(
String roomId,
String announcement,
) async {
Map req = {"roomId": roomId, "announcement": announcement};
Map result = await _channel.invokeMethod(
ChatMethodKeys.updateChatRoomAnnouncement, req);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}