예제 #1
0
        private async Task <HttpResponse> HandleInteractiveMessage(HttpContext context, InteractiveMessage interactiveMessage)
        {
            var response = await _slackInteractiveMessages.Handle(interactiveMessage).ConfigureAwait(false);

            var responseJson = response == null ? null
                : interactiveMessage.IsAppUnfurl ? Serialize(new AttachmentUpdateResponse(response))
                : Serialize(new MessageUpdateResponse(response));

            return(await context.Respond(HttpStatusCode.OK, "application/json", responseJson).ConfigureAwait(false));
        }
예제 #2
0
        private async Task <SlackResponse> HandleInteractiveMessage(InteractiveMessage interactiveMessage)
        {
            var response = await _slackInteractiveMessages.Handle(interactiveMessage).ConfigureAwait(false);

            var responseObject = response == null ? null
                : interactiveMessage.IsAppUnfurl ? (object)new AttachmentUpdateResponse(response)
                : new MessageUpdateResponse(response);

            return(new JsonResponse(HttpStatusCode.OK, responseObject));
        }
 public Task <MessageResponse> Handle(InteractiveMessage request) => _interactiveMessages.Handle(request);