mirror of https://github.com/SeanOMik/znc-push.git
Fix #6: Add 'target' option to support Pushover devices
This commit is contained in:
parent
2806967e02
commit
ea8c52e766
|
@ -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
|
||||
|
||||
|
|
7
push.cpp
7
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")
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue