editOptionalConversation static method

Future<Int64Response> editOptionalConversation(
  1. HttpClient client,
  2. String conversationId,
  3. String groupId,
  4. GroupOptionalConversationEditRequest body,
)

Edit the settings of an optional conversation/chat channel. Requires admin permissions to the group.

Implementation

static Future<Int64Response> editOptionalConversation (
    HttpClient client,
    String conversationId,
    String groupId,
    GroupOptionalConversationEditRequest body
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _conversationId = '$conversationId';
    final String _groupId = '$groupId';
    final HttpClientConfig config = HttpClientConfig('POST', '/GroupV2/$_groupId/OptionalConversations/Edit/$_conversationId/', params);
    config.body = await body.asyncToJson();
    config.bodyContentType = 'application/json';
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return Int64Response.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}