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