Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix #6: Add 'target' option to support Pushover devices

  • Loading branch information...
commit ea8c52e766352f6009bddd9681a5d69ae4094636 1 parent 2806967
@jreese authored
Showing with 13 additions and 1 deletion.
  1. +7 −0 README.md
  2. +6 −1 push.cpp
View
7 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
View
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")
{
Please sign in to comment.
Something went wrong with that request. Please try again.