Merge branch 'events.js' into 'dev'

add '{{REASON}}' substitution string for webhook

See merge request Shinobi-Systems/Shinobi!145
revert-b25c0d81
Moe 2020-02-07 20:04:33 +00:00
commit 1971955034
1 changed files with 6 additions and 0 deletions

View File

@ -61,6 +61,12 @@ module.exports = function(s,config,lang){
newString = newString
.replace(/{{CONFIDENCE}}/g,d.details.confidence)
}
if(newString.includes("REASON")) {
if(d.details.reason) {
newString = newString
.replace(/{{REASON}}/g, d.details.reason)
}
}
return newString
}
s.filterEvents = function(x,d){