Added message_uri option

This commit is contained in:
John Reese 2011-01-13 22:27:26 -05:00
parent 53a965fe5c
commit c749f4874b
2 changed files with 13 additions and 1 deletions

View File

@ -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:

View File

@ -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;