mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 03:11:48 -05:00
announce new bugs to discord
This commit is contained in:
parent
54967e89a4
commit
0214626db3
1 changed files with 7 additions and 0 deletions
|
@ -128,7 +128,14 @@ public ActionResult PostBug(PostBugViewModel model)
|
||||||
db.ForumPosts.Add(comment);
|
db.ForumPosts.Add(comment);
|
||||||
db.Bugs.Add(bug);
|
db.Bugs.Add(bug);
|
||||||
db.SaveChanges();
|
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 });
|
return RedirectToAction("ViewBug", new { id = bug.Id });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue