Update push.cpp

This commit is contained in:
Kevin Siml 2017-02-26 23:10:46 +01:00 committed by GitHub
parent 4bf46901fa
commit a432dbf449
1 changed files with 36 additions and 0 deletions

View File

@ -411,6 +411,42 @@ class CPushMod : public CModule
params["priority"] = options["message_priority"]; params["priority"] = options["message_priority"];
} }
} }
else if (service == "pushsafer")
{
if (options["secret"] == "")
{
PutModule("Error: privatekey (private or alias key) not set");
return;
}
service_host = "pushsafer.com";
service_url = "/api";
params["k"] = options["secret"];
params["t"] = message_title;
params["m"] = message_content;
if (message_uri != "")
{
params["u"] = message_uri;
}
if ( options["message_uri_title"] != "" )
{
params["ut"] = options["message_uri_title"];
}
if (options["target"] != "")
{
params["d"] = options["target"];
}
if ( options["message_sound"] != "" )
{
params["s"] = options["message_sound"];
}
}
else if (service == "pushalot") else if (service == "pushalot")
{ {