diff options
author | Christian Hesse <mail@eworm.de> | 2024-04-09 23:50:00 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-04-15 09:11:25 +0200 |
commit | fb865ba114e610bcb272d8de7c1c882705e6e06e (patch) | |
tree | e22ac0b4915c41585c8f7ec02b686a54991b6328 /mod | |
parent | ca2e5f2a017c20f272419c5539b7c234a02f45a4 (diff) |
mod/notification-ntfy: use custom user agent string
Diffstat (limited to 'mod')
-rw-r--r-- | mod/notification-ntfy.rsc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mod/notification-ntfy.rsc b/mod/notification-ntfy.rsc index ffe0c50..4413f07 100644 --- a/mod/notification-ntfy.rsc +++ b/mod/notification-ntfy.rsc @@ -72,6 +72,7 @@ :global CertificateAvailable; :global EitherOr; + :global FetchUserAgentStr; :global IfThenElse; :global LogPrint; :global SymbolForNotification; @@ -87,7 +88,8 @@ } :local Url ("https://" . $NtfyServer . "/" . [ $UrlEncode $NtfyTopic ]); - :local Headers ({ ("Priority: " . [ $IfThenElse ($Notification->"silent") "low" "default" ]); \ + :local Headers ({ [ $FetchUserAgentStr ($Notification->"origin") ]; \ + ("Priority: " . [ $IfThenElse ($Notification->"silent") "low" "default" ]); \ ("Title: " . "[" . $IdentityExtra . $Identity . "] " . ($Notification->"subject")) }); :local Text (($Notification->"message") . "\n"); :if ([ :len ($Notification->"link") ] > 0) do={ |