updateChannelPrivacyWithHttpInfo method
Future<Response>
updateChannelPrivacyWithHttpInfo(
- String channelId,
- MmUpdateChannelPrivacyRequest mmUpdateChannelPrivacyRequest
Update channel's privacy
Updates channel's privacy allowing changing a channel from Public to Private and back. Minimum server version: 5.16 ##### Permissions manage_team
permission for the channels team on version < 5.28. convert_public_channel_to_private
permission for the channel if updating privacy to 'P' on version >= 5.28. convert_private_channel_to_public
permission for the channel if updating privacy to 'O' on version >= 5.28.
Note: This method returns the HTTP Response
.
Parameters:
-
String channelId (required): Channel GUID
-
MmUpdateChannelPrivacyRequest mmUpdateChannelPrivacyRequest (required):
Implementation
Future<Response> updateChannelPrivacyWithHttpInfo(
String channelId,
MmUpdateChannelPrivacyRequest mmUpdateChannelPrivacyRequest,
) async {
// ignore: prefer_const_declarations
final path = r'/channels/{channel_id}/privacy'.replaceAll('{channel_id}', channelId);
// ignore: prefer_final_locals
Object? postBody = mmUpdateChannelPrivacyRequest;
final queryParams = <MmQueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}