updateGroupAnnouncement method
~english Updates the group announcement. Only the group owner and admins can call this method.
Param groupId The group ID.
Param announcement The new group announcement.
Returns None.
Throws Exception description, see EMError. ~end
~chinese 修改群公告。 仅群主和管理员有权限调用。
Param groupId 群组 ID。
Param announcement 新的群公告内容。
Return 无。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError. ~end
Implementation
Future<void> updateGroupAnnouncement(
String groupId,
String announcement,
) async {
try {
Map req = {'groupId': groupId, 'announcement': announcement};
Map result = await Client.instance.groupManager
.callNativeMethod(ChatMethodKeys.updateGroupAnnouncement, req);
EMError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}