Add titles and categories to notifications
Also, add more event data to prompts.
This commit is contained in:
@@ -45,15 +45,17 @@ type ThreatPayload struct {
|
||||
// // Once you're done, delete the threat
|
||||
// threat.Delete().Publish()
|
||||
//
|
||||
func NewThreat(id, msg string) *Threat {
|
||||
func NewThreat(id, title, msg string) *Threat {
|
||||
t := &Threat{
|
||||
Notification: ¬ifications.Notification{
|
||||
EventID: id,
|
||||
Message: msg,
|
||||
Type: notifications.Warning,
|
||||
State: notifications.Active,
|
||||
EventID: id,
|
||||
Type: notifications.Warning,
|
||||
Title: title,
|
||||
Category: "Threat",
|
||||
Message: msg,
|
||||
},
|
||||
}
|
||||
|
||||
t.threatData().Started = time.Now().Unix()
|
||||
|
||||
return t
|
||||
|
||||
Reference in New Issue
Block a user