Update Telegram.xml

Added feature, 'tsend' to send test notification.
pull/1/head
AardCrowley 5 years ago
parent 6e980342c8
commit e42b0bf505

@ -10,6 +10,18 @@
</plugin> </plugin>
<aliases>
<alias
name="TestAlert"
match="^tsend$"
script="sendAlert"
regexp="y"
ignore_case="y"
enabled="y"
>
</alias>
</aliases>
<!-- Script --> <!-- Script -->
@ -64,12 +76,17 @@ function pageRequest(req, protocol)
end end
function sendAlert(name, line, wildcards) function sendAlert(name, line, wildcards)
local wc = wildcards[1] or ""
if name ~= "TestAlert" then
for _,v in ipairs(triggerLines) do for _,v in ipairs(triggerLines) do
if name == v.name then if name == v.name then
msg = string.format(alertFormat, v.message) msg = string.format(alertFormat, v.message .. wc)
break break
end end
end end
else
msg = string.format(alertFormat, "Test notification."
end
pageRequest(msg, "HTTPS") pageRequest(msg, "HTTPS")
end end
]]> ]]>

Loading…
Cancel
Save