Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> CreateDirectChannelAsync([FromBody] CreateDirectChannelRequest request)
        {
            var channel = await _channelSocketService.CreateDirectChannelAsync(new CreateDirectChannelRequest(GetCurrentSaasUserId(), request.MemberId));

            return(Ok(channel));
        }