2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-07 23:09:26 +00:00

70_Pushover: fix multi-device addressing

git-svn-id: https://svn.fhem.de/fhem/trunk@12639 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2016-11-23 18:13:53 +00:00
parent dad76ceb7d
commit 22106a7810

View File

@ -833,9 +833,10 @@ sub Pushover_SetMessage {
# check if we got a user or group key as device and use it as
# user-key instead of hash->USER_KEY
if ( $values{device} =~ /^([A-Za-z0-9]{30})?:?([A-Za-z0-9_-]*)?(.*)?$/ ) {
$values{USER_KEY} = $1 if ( $1 ne "" );
$values{device} = $2;
if ( $values{device} =~ /^(([A-Za-z0-9]{30}):)?([A-Za-z0-9,_-]*)(.*)$/ )
{
$values{USER_KEY} = $2 if ( $2 ne "" );
$values{device} = $3;
return $hash->{helper}{FAILED_USERKEYS}{ $values{USER_KEY} }
if ( $values{USER_KEY}
@ -1078,9 +1079,10 @@ sub Pushover_SetMessage2 ($$$$) {
# check if we got a user or group key as device and use it as
# user-key instead of hash->USER_KEY
if ( $values{device} =~ /^([A-Za-z0-9]{30})?:?([A-Za-z0-9_-]*)?(.*)?$/ ) {
$values{USER_KEY} = $1 if ( $1 ne "" );
$values{device} = $2;
if ( $values{device} =~ /^(([A-Za-z0-9]{30}):)?([A-Za-z0-9,_-]*)(.*)$/ )
{
$values{USER_KEY} = $2 if ( $2 ne "" );
$values{device} = $3;
return $hash->{helper}{FAILED_USERKEYS}{ $values{USER_KEY} }
if ( $values{USER_KEY}