예제 #1
0
        private bool SaveAnswer(SlackMessage slackMessage)
        {
            Message message = new Message
            {
                text = slackMessage.Text,

                StringTimeStamp = JsonConvert.DeserializeObject <JObject>(slackMessage.RawData)
                                  .SelectToken("ts")
                                  .ToString(),

                user = slackMessage.User.ID
            };

            var response = webApi.SaveAnswer(message);

            return(response.StatusCode == HttpStatusCode.OK);
        }