Add support for Pushover message priorities

This commit is contained in:
John Reese 2013-04-29 12:57:58 -07:00
parent e7fd72248d
commit b56b1cb401
2 changed files with 11 additions and 0 deletions

View File

@ -248,6 +248,11 @@ to something similar to "http://domain/#channel/2011-03-09 14:25:09", or
Message content that will be sent for the push notification. Keyword expansion is Message content that will be sent for the push notification. Keyword expansion is
performed on this value. performed on this value.
* `message_priority = ""`
Priority level that will be used for the push notification.
Currently supported only by Pushover.net.
### Conditions ### Conditions

View File

@ -117,6 +117,7 @@ class CPushMod : public CModule
defaults["message_length"] = "100"; defaults["message_length"] = "100";
defaults["message_title"] = "{title}"; defaults["message_title"] = "{title}";
defaults["message_content"] = "{message}"; defaults["message_content"] = "{message}";
defaults["message_priority"] = "0";
// Notification conditions // Notification conditions
defaults["away_only"] = "no"; defaults["away_only"] = "no";
@ -322,6 +323,11 @@ class CPushMod : public CModule
if ( options["message_sound"] != "" ) if ( options["message_sound"] != "" )
{ {
params["sound"] = options["message_sound"]; params["sound"] = options["message_sound"];
}
if (options["message_priority"] != "")
{
params["priority"] = options["message_priority"];
} }
} }
else if (service == "prowl") else if (service == "prowl")