createDirectChannelWithHttpInfo method
Create a direct message channel
Create a new direct message channel between two users. ##### Permissions Must be one of the two users and have create_direct_channel
permission. Having the manage_system
permission voids the previous requirements.
Note: This method returns the HTTP Response
.
Parameters:
- List<String> requestBody (required): The two user ids to be in the direct message
Implementation
Future<Response> createDirectChannelWithHttpInfo(
List<String> requestBody,
) async {
// ignore: prefer_const_declarations
final path = r'/channels/direct';
// ignore: prefer_final_locals
Object? postBody = requestBody;
final queryParams = <MmQueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}