From c749f4874b8bff15eaa8c3a5aca17a53bcd8ba3b Mon Sep 17 00:00:00 2001 From: John Reese Date: Thu, 13 Jan 2011 22:27:26 -0500 Subject: [PATCH] Added message_uri option --- README.md | 9 +++++++++ notifo.cpp | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b11773d..703c8ab 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,14 @@ Configuration value. A value of 0 (zero) will disable this condition. +### Notifications + +* `message_url = ""` + + URI that will be sent with the notification to Notifo. This could be a web address or a + local scheme to access a mobile application. + + License ------- @@ -80,3 +88,4 @@ This project is licensed under the MIT license. See the `LICENSE` file for deta [Notifo]: http://notifo.com "Notifo, Mobile Notifications for Everything" [ZNC]: http://en.znc.in "ZNC, an advanced IRC bouncer" +# vim:set ft= expandtab tabstop=4 shiftwidth=4: diff --git a/notifo.cpp b/notifo.cpp index c41774d..e670ce5 100644 --- a/notifo.cpp +++ b/notifo.cpp @@ -74,6 +74,9 @@ class CNotifoMod : public CModule // Notification conditions options["client_count_less_than"] = "0"; + + // Notification settings + options["message_uri"] = ""; } virtual ~CNotifoMod() {} @@ -115,7 +118,7 @@ class CNotifoMod : public CModule post += "&msg=" + urlencode(message); post += "&label=" + urlencode(app); post += "&title=" + urlencode(title); - post += "&uri=" + urlencode(CString("http://notifo.leetcode.net/")); + post += "&uri=" + urlencode(options["message_uri"]); // Request headers and POST body CString request = "POST " + notifo_url + " HTTP/1.1" + crlf;