From cfa606ab05a5a2249ff80f028eaa9f98cedb9fd6 Mon Sep 17 00:00:00 2001 From: Ryan Collins Date: Mon, 10 Feb 2014 20:49:08 -0500 Subject: [PATCH 1/3] * Added support for the Faast app (http://faast.io) for iOS * Fixed the URL link for the logo for SuperToasty --- push.cpp | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/push.cpp b/push.cpp index 8bc65bb..4279649 100755 --- a/push.cpp +++ b/push.cpp @@ -407,10 +407,32 @@ class CPushMod : public CModule params["title"] = message_title; params["text"] = message_content; - params["image"] = "https://github.com/jreese/znc-push/raw/supertoasty/logo.png"; + params["image"] = "https://raw2.github.com/jreese/znc-push/master/logo.png"; params["sender"] = "ZNC Push"; } - else if (service == "url") + else if (service == "faast") + { + if (options["secret"] == "") + { + PutModule("Error: secret not set to apikey"); + return; + } + + service_host = "www.appnotifications.com"; + service_url = "/account/notifications.json"; + + params["user_credentials"] = options["secret"]; + params["notification[title]"] = message_title; + params["notification[subtitle]"] = context; + params["notification[message]"] = message_content; + params["notification[long_message]"] = message_content; + params["notification[icon_url]"] = "https://raw2.github.com/jreese/znc-push/master/logo.png"; + if ( options["message_sound"] != "" ) + { + params["notification[sound]"] = options["message_sound"]; + } + } + else if (service == "url") { if (options["message_uri"] == "") { @@ -1121,6 +1143,11 @@ class CPushMod : public CModule { PutModule("Note: Airgram requires setting the 'target' with the email address of the recipient"); } + else if (value == "faast") + { + PutModule("Note: Faast requires setting the secret to your apikey"); + } + else { PutModule("Error: unknown service name"); From 535b36a470c536aa07fe89c32904dbf42a1c304e Mon Sep 17 00:00:00 2001 From: Ryan Collins Date: Mon, 10 Feb 2014 20:57:39 -0500 Subject: [PATCH 2/3] Added Faast to the list of supported services --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index fdf5127..f46eaae 100755 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ conditions. ZNC Push current supports the following services: * [Supertoasty][] * [PushBullet][] * [Airgram][] +* [Faast][] * Custom URL GET requests This project is still a Work In Progress, but should be functional enough and stable enough @@ -417,6 +418,7 @@ This project is licensed under the MIT license. See the `LICENSE` file for deta [Supertoasty]: http://www.supertoasty.com [PushBullet]: https://www.pushbullet.com/ [Airgram]: http://airgramapp.com/ +[Faast]: http://faast.io/ [issues]: http://github.com/jreese/znc-push/issues [ZNC]: http://en.znc.in "ZNC, an advanced IRC bouncer" From ea84b143044b178762487e0f15f4b615c5b64af6 Mon Sep 17 00:00:00 2001 From: Ryan Collins Date: Fri, 14 Feb 2014 17:34:14 -0500 Subject: [PATCH 3/3] Added the message_uri parameter to the faast server. You can set it to your irc app, like colloquy:// and Faast will open Colloquy when you select it --- push.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/push.cpp b/push.cpp index 4279649..de3e14c 100755 --- a/push.cpp +++ b/push.cpp @@ -431,6 +431,10 @@ class CPushMod : public CModule { params["notification[sound]"] = options["message_sound"]; } + if ( options["message_uri"] != "" ) + { + params["notification[run_command]"] = options["message_uri"]; + } } else if (service == "url") {