updateGroupDesc method

Future<void> updateGroupDesc(
  1. String groupId,
  2. String desc
)

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 ChatError.

Implementation

Future<void> updateGroupDesc(
  String groupId,
  String desc,
) async {
  try {
    Map req = {'desc': desc, 'groupId': groupId};
    Map result = await platform_interface.Client.instance.groupManager
        .callNativeMethod(ChatMethodKeys.updateDescription, req);
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}