toggleJoinRequest method

Future<Result<UpdatesBase>> toggleJoinRequest({
  1. required InputChannelBase channel,
  2. required bool enabled,
})

Toggle Join Request.

ID: 4c2985b6.

Implementation

Future<Result<UpdatesBase>> toggleJoinRequest({
  required InputChannelBase channel,
  required bool enabled,
}) async {
  // Preparing the request.
  final request = ChannelsToggleJoinRequest(
    channel: channel,
    enabled: enabled,
  );

  // Invoke and wait for response.
  final response = await _c.invoke(request);

  // Return the result.
  return response._to<UpdatesBase>();
}