mirror of https://github.com/SeanOMik/znc-push.git
Fix #91: Update pushbullet to api v2
This commit is contained in:
parent
055fc3981d
commit
8c814bfacc
12
push.cpp
12
push.cpp
|
@ -267,19 +267,23 @@ class CPushMod : public CModule
|
|||
// Service-specific profiles
|
||||
if (service == "pushbullet")
|
||||
{
|
||||
if (options["target"] == "" || options["secret"] == "")
|
||||
if (options["secret"] == "")
|
||||
{
|
||||
PutModule("Error: target (device id) or secret (api key) not set");
|
||||
PutModule("Error: secret (api key) not set");
|
||||
return;
|
||||
}
|
||||
|
||||
service_host = "api.pushbullet.com";
|
||||
service_url = "/api/pushes";
|
||||
service_url = "/v2/pushes";
|
||||
|
||||
// BASIC auth, base64-encoded APIKey:
|
||||
service_auth = options["secret"] + CString(":");
|
||||
|
||||
params["device_iden"] = options["target"];
|
||||
if (options["target"] != "")
|
||||
{
|
||||
params["device_iden"] = options["target"];
|
||||
}
|
||||
|
||||
params["type"] = "note";
|
||||
params["title"] = message_title;
|
||||
params["body"] = message_content;
|
||||
|
|
Loading…
Reference in New Issue