diff --git a/README.md b/README.md index 7d15b15..08d042c 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,7 @@ to something similar to "http://domain/#channel/2011-03-09 14:25:09", or User account that should receive push notifications. - This option must be set when using Boxcar or Notifo. + This option must be set when using Boxcar, Pushover or Notifo. * `secret = ""` diff --git a/push.cpp b/push.cpp index f36650e..0d1e417 100644 --- a/push.cpp +++ b/push.cpp @@ -309,19 +309,22 @@ class CPushMod : public CModule } else if (service == "pushover") { - if (options["secret"] == "") + if (options["username"] == "") { - PutModule("Error: secret (user key) not set"); + PutModule("Error: username (user key) not set"); + return; + } + if (options["secret"] == "") + { + PutModule("Error: secret (application token/key) not set"); return; } - - CString pushover_api_token = "h6RToHDU7gNnB3IMyUb94SuwKtBzOD"; service_host = "api.pushover.net"; service_url = "/1/messages.json"; - params["token"] = pushover_api_token; - params["user"] = options["secret"]; + params["token"] = options["secret"]; + params["user"] = options["username"]; params["title"] = message_title; params["message"] = message_content;