From a432dbf449fe0abc8a2a74ebd84acde6d5b19733 Mon Sep 17 00:00:00 2001 From: Kevin Siml Date: Sun, 26 Feb 2017 23:10:46 +0100 Subject: [PATCH] Update push.cpp --- push.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/push.cpp b/push.cpp index dafc080..f1af087 100755 --- a/push.cpp +++ b/push.cpp @@ -411,6 +411,42 @@ class CPushMod : public CModule 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") {