Remove hardcoded pushover app key; use username/secert for user/token instead

This commit is contained in:
Jake Watkins 2013-07-30 10:25:46 -07:00
parent 8be77b27be
commit be540b540c
2 changed files with 10 additions and 7 deletions

View File

@ -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 = ""`

View File

@ -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;