예제 #1
0
        public SlackResponse Process(SlackRequest slackRequest)
        {
            var bAuthorized = _validator.IsAuthorized(slackRequest);

            if (!bAuthorized)
            {
                return(new SlackResponse
                {
                    Text = UnauthorizedResponse,
                    ResponseType = ResponseType.Ephemeral
                });
            }
            _formTextContent = slackRequest.CommandText;
            _channelInfo     = _databaseClient.GetSlackChannelInfo(slackRequest.ChannelName);
            return(_triggerWordMap[slackRequest.CommandType]());
        }