public async Task <ChannelSummaryResponse> CreateDirectChannelAsync(CreateDirectChannelRequest request) { return(await ValidateAndExecuteAsync(request, new CreateDirectChannelRequestValidator(), new TaskReference <ChannelSummaryResponse>(async() => { var createChannelRequest = new DomainRequest.Channel.CreateDirectChannelRequest(Context.GetSaasUserId(), request.MemberId); return await _channelSocketService.CreateDirectChannelAsync(createChannelRequest); }), request.RequestId)); }
public async Task <IActionResult> CreateDirectChannelAsync([FromBody] CreateDirectChannelRequest request) { var channel = await _channelSocketService.CreateDirectChannelAsync(new CreateDirectChannelRequest(GetCurrentSaasUserId(), request.MemberId)); return(Ok(channel)); }