Beispiel #1
0
        /// <summary>
        /// Public interface for running command's task. Validation of messages happens inside this method.
        /// </summary>
        /// <param name="webhookMessage"></param>
        /// <returns></returns>
        public async Task <bool> ExecuteAsync(WebhookMessage webhookMessage)
        {
            if (Slack.ValidWebhookMessage(webhookMessage) && webhookMessage.UserId != null)
            {
                await HandleMessage(webhookMessage);
            }
            else
            {
                return(false);
            }

            return(true);
        }