70_Pushover: restrict priority range between -2 and 2

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@9384 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2015-10-05 18:45:00 +00:00
parent b610f4db7b
commit ee45c215c0

View File

@ -701,6 +701,8 @@ sub Pushover_SetMessage {
} }
if ( $values{priority} ne "" ) { if ( $values{priority} ne "" ) {
$values{priority} = 2 if ($values{priority} > 2);
$values{priority} = -2 if ($values{priority} < -2);
$body = $body . "&priority=" . $values{priority}; $body = $body . "&priority=" . $values{priority};
} }