mirror of https://github.com/SeanOMik/znc-push.git
Added message_uri option
This commit is contained in:
parent
53a965fe5c
commit
c749f4874b
|
@ -70,6 +70,14 @@ Configuration
|
||||||
value. A value of 0 (zero) will disable this condition.
|
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
|
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"
|
[Notifo]: http://notifo.com "Notifo, Mobile Notifications for Everything"
|
||||||
[ZNC]: http://en.znc.in "ZNC, an advanced IRC bouncer"
|
[ZNC]: http://en.znc.in "ZNC, an advanced IRC bouncer"
|
||||||
|
|
||||||
|
# vim:set ft= expandtab tabstop=4 shiftwidth=4:
|
||||||
|
|
|
@ -74,6 +74,9 @@ class CNotifoMod : public CModule
|
||||||
|
|
||||||
// Notification conditions
|
// Notification conditions
|
||||||
options["client_count_less_than"] = "0";
|
options["client_count_less_than"] = "0";
|
||||||
|
|
||||||
|
// Notification settings
|
||||||
|
options["message_uri"] = "";
|
||||||
}
|
}
|
||||||
virtual ~CNotifoMod() {}
|
virtual ~CNotifoMod() {}
|
||||||
|
|
||||||
|
@ -115,7 +118,7 @@ class CNotifoMod : public CModule
|
||||||
post += "&msg=" + urlencode(message);
|
post += "&msg=" + urlencode(message);
|
||||||
post += "&label=" + urlencode(app);
|
post += "&label=" + urlencode(app);
|
||||||
post += "&title=" + urlencode(title);
|
post += "&title=" + urlencode(title);
|
||||||
post += "&uri=" + urlencode(CString("http://notifo.leetcode.net/"));
|
post += "&uri=" + urlencode(options["message_uri"]);
|
||||||
|
|
||||||
// Request headers and POST body
|
// Request headers and POST body
|
||||||
CString request = "POST " + notifo_url + " HTTP/1.1" + crlf;
|
CString request = "POST " + notifo_url + " HTTP/1.1" + crlf;
|
||||||
|
|
Loading…
Reference in New Issue