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
|
// Service-specific profiles
|
||||||
if (service == "pushbullet")
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
service_host = "api.pushbullet.com";
|
service_host = "api.pushbullet.com";
|
||||||
service_url = "/api/pushes";
|
service_url = "/v2/pushes";
|
||||||
|
|
||||||
// BASIC auth, base64-encoded APIKey:
|
// BASIC auth, base64-encoded APIKey:
|
||||||
service_auth = options["secret"] + CString(":");
|
service_auth = options["secret"] + CString(":");
|
||||||
|
|
||||||
params["device_iden"] = options["target"];
|
if (options["target"] != "")
|
||||||
|
{
|
||||||
|
params["device_iden"] = options["target"];
|
||||||
|
}
|
||||||
|
|
||||||
params["type"] = "note";
|
params["type"] = "note";
|
||||||
params["title"] = message_title;
|
params["title"] = message_title;
|
||||||
params["body"] = message_content;
|
params["body"] = message_content;
|
||||||
|
|
Loading…
Reference in New Issue