Update Telegram.xml

master
AardCrowley 2 years ago committed by GitHub
parent a587cc9e2e
commit d15415d071
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -70,6 +70,7 @@ function url_encode(str)
end end
function pageRequest(req, protocol) function pageRequest(req, protocol)
local req = string.format(alertFormat, req)
if async_ok then if async_ok then
async.doAsyncRemoteRequest(req, "", protocol) async.doAsyncRemoteRequest(req, "", protocol)
else else
@ -82,12 +83,12 @@ function sendAlert(name, line, wildcards)
local wc = wildcards[1] or "" local wc = wildcards[1] or ""
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, url.escape(v.message .. wc)) msg = url.escape(v.message .. wc)
break break
end end
end end
else else
msg = string.format(alertFormat, "Test notification.") msg = "Test notification."
end end
pageRequest(msg, "HTTPS") pageRequest(msg, "HTTPS")
end end

Loading…
Cancel
Save