From 0214626db3de7964ce572bf4de27aeb36fc6225a Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 28 May 2017 12:48:48 -0400 Subject: [PATCH] announce new bugs to discord --- Project-Unite/Controllers/BugsController.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Project-Unite/Controllers/BugsController.cs b/Project-Unite/Controllers/BugsController.cs index 69a7fb8..c44f386 100644 --- a/Project-Unite/Controllers/BugsController.cs +++ b/Project-Unite/Controllers/BugsController.cs @@ -128,7 +128,14 @@ public ActionResult PostBug(PostBugViewModel model) db.ForumPosts.Add(comment); db.Bugs.Add(bug); db.SaveChanges(); + NotificationDaemon.ScreamToDiscord($"A bug has been opened by {ACL.UserNameRaw(User.Identity.GetUserId())}", $@"**Title:** {bug.Name} +**Version ID:** {bug.ReleaseId} +**Species:** {bug.Species} +**Urgency:** {bug.Urgency} +**Author's description:** + +{comment.Body.Substring(Math.Min(comment.Body.Length, 128))}", Url.Action("ViewBug", new { id = bug.Id })); return RedirectToAction("ViewBug", new { id = bug.Id }); } }