diff --git a/README.md b/README.md index 04814ea..6595b3e 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,13 @@ Configuration This option must be set when using Notifo, Notify My Android, Pushover, Prowl or Supertoasty. +* `target = ""` + + Device or target name for push notifications. + + When using Pushover, this option allows you to specify a single device name to send + notifications to; if blank or unset, notifications will be sent to all devices. + ### Conditions diff --git a/push.cpp b/push.cpp index bef4151..ba469c1 100644 --- a/push.cpp +++ b/push.cpp @@ -114,6 +114,7 @@ class CPushMod : public CModule defaults["service"] = ""; defaults["username"] = ""; defaults["secret"] = ""; + defaults["target"] = ""; // Condition strings defaults["channel_conditions"] = "all"; @@ -298,9 +299,13 @@ class CPushMod : public CModule params["token"] = pushover_api_token; params["user"] = options["secret"]; - //params["device"] = short_message; params["title"] = title; params["message"] = short_message; + + if (options["target"] != "") + { + params["device"] = options["target"]; + } } else if (service == "prowl") {