Esempio n. 1
0
        private static void SendSlackNotification(string post)
        {
            post = post.Replace("&", "&amp;").Replace("<", "&lt;").Replace(">", "&gt;");
            var slack = new Slack();

            slack.PostSlackMessage(post);
        }
Esempio n. 2
0
        public static void SendSlackSpamReport(string postBody, int topicId, string commentType, int memberId)
        {
            var ts = new TopicService(ApplicationContext.Current.DatabaseContext);

            var topic = ts.GetById(topicId);
            var post  = string.Format("Topic title: *{0}*\n\n Link to topic: https://our.umbraco.com{1}\n\n", topic.Title, topic.GetUrl());

            post = post + string.Format("{0} text: {1}\n\n", commentType, postBody);
            post = post + string.Format("Go to member https://our.umbraco.com/member/{0}\n\n", memberId);

            var body = string.Format("The following forum post was marked as spam by the spam system, if this is incorrect make sure to mark it as ham.\n\n{0}", post);

            body = body.Replace("&", "&amp;").Replace("<", "&lt;").Replace(">", "&gt;");

            var slack = new Slack();

            slack.PostSlackMessage(body);
        }
Esempio n. 3
0
        private void SendSlackNotification(string body)
        {
            var slack = new Slack();

            slack.PostSlackMessage(body);
        }