Software /
code /
prosody-modules
Changeset
4627:adda872fa9e1
mod_pubsub_alertmanager: Include status booleans in template input
For easier conditionals, e.g. {firing&oh no} or {resolved&okay then}
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 18 Jul 2021 00:21:35 +0200 |
parents | 4626:285efde5e8a5 |
children | 4628:15c4eabdcea0 |
files | mod_pubsub_alertmanager/mod_pubsub_alertmanager.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pubsub_alertmanager/mod_pubsub_alertmanager.lua Sun Jul 18 00:19:50 2021 +0200 +++ b/mod_pubsub_alertmanager/mod_pubsub_alertmanager.lua Sun Jul 18 00:21:35 2021 +0200 @@ -79,6 +79,8 @@ local data = { status = payload.attr.status, + firing = "firing" == payload.attr.status, + resolved = "resolved" == payload.attr.status, annotations = {}, labels = {}, endsAt = payload:find("ends/@at"),