diff --git a/README.md b/README.md index 7db1885..778302f 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,39 @@ to something similar to "http://domain/#channel/2011-03-09 14:25:09", or notifications to; if blank or unset, notifications will be sent to all devices. +### Notifications + +* `message_sound = ""` + + If you're using the Pushover.net API, you can specify a specific sound for the notifications. + +* `message_uri = ""` + + URI that will be sent with the push notification. This could be a web address or a + local scheme to access a mobile application. Keyword expansion is performed on this + value. + +* `message_length = 100` + + Maximum length of the notification message to be sent. The message will be nicely + truncated and ellipsized at or before this length is reached. A value of 0 (zero) will + disable this option. + + When using the custom URL service, this options allows you to specify the URL to send + a GET request to, and has keyword expansion performed on portions of it, including the + path and any query parameter values. + +* `message_title = "{title}"` + + Title that will be provided for the push notification. Keyword expansion is performed + on this value. + +* `message_content = "{message}"` + + Message content that will be sent for the push notification. Keyword expansion is + performed on this value. + + ### Conditions * `away_only = "no"` @@ -294,35 +327,6 @@ to something similar to "http://domain/#channel/2011-03-09 14:25:09", or query window more recently than the last time a notification was sent for that context. -### Notifications - -* `message_length = 100` - - Maximum length of the notification message to be sent. The message will be nicely - truncated and ellipsized at or before this length is reached. A value of 0 (zero) will - disable this option. - -* `message_uri = ""` - - URI that will be sent with the push notification. This could be a web address or a - local scheme to access a mobile application. Keyword expansion is performed on this - value. - - When using the custom URL service, this options allows you to specify the URL to send - a GET request to, and has keyword expansion performed on portions of it, including the - path and any query parameter values. - -* `message_title = "{title}"` - - Title that will be provided for the push notification. Keyword expansion is performed - on this value. - -* `message_content = "{message}"` - - Message content that will be sent for the push notification. Keyword expansion is - performed on this value. - - ### Advanced * `channel_conditions = "all"` diff --git a/push.cpp b/push.cpp index 64015c0..79e71cf 100644 --- a/push.cpp +++ b/push.cpp @@ -110,9 +110,12 @@ class CPushMod : public CModule defaults["secret"] = ""; defaults["target"] = ""; - // Condition strings - defaults["channel_conditions"] = "all"; - defaults["query_conditions"] = "all"; + // Notification settings + defaults["message_sound"] = ""; + defaults["message_uri"] = ""; + defaults["message_length"] = "100"; + defaults["message_title"] = "{title}"; + defaults["message_content"] = "{message}"; // Notification conditions defaults["away_only"] = "no"; @@ -124,12 +127,9 @@ class CPushMod : public CModule defaults["nick_blacklist"] = ""; defaults["replied"] = "yes"; - // Notification settings - defaults["message_length"] = "100"; - defaults["message_uri"] = ""; - defaults["message_title"] = "{title}"; - defaults["message_content"] = "{message}"; - + // Advanced + defaults["channel_conditions"] = "all"; + defaults["query_conditions"] = "all"; defaults["debug"] = "off"; } virtual ~CPushMod() {} @@ -312,6 +312,11 @@ class CPushMod : public CModule { params["device"] = options["target"]; } + + if ( options["message_sound"] != "" ) + { + params["sound"] = options["message_sound"]; + } } else if (service == "prowl") {