mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-29 23:47:10 +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:
parent
dad76ceb7d
commit
22106a7810
@ -833,9 +833,10 @@ sub Pushover_SetMessage {
|
|||||||
|
|
||||||
# check if we got a user or group key as device and use it as
|
# check if we got a user or group key as device and use it as
|
||||||
# user-key instead of hash->USER_KEY
|
# user-key instead of hash->USER_KEY
|
||||||
if ( $values{device} =~ /^([A-Za-z0-9]{30})?:?([A-Za-z0-9_-]*)?(.*)?$/ ) {
|
if ( $values{device} =~ /^(([A-Za-z0-9]{30}):)?([A-Za-z0-9,_-]*)(.*)$/ )
|
||||||
$values{USER_KEY} = $1 if ( $1 ne "" );
|
{
|
||||||
$values{device} = $2;
|
$values{USER_KEY} = $2 if ( $2 ne "" );
|
||||||
|
$values{device} = $3;
|
||||||
|
|
||||||
return $hash->{helper}{FAILED_USERKEYS}{ $values{USER_KEY} }
|
return $hash->{helper}{FAILED_USERKEYS}{ $values{USER_KEY} }
|
||||||
if ( $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
|
# check if we got a user or group key as device and use it as
|
||||||
# user-key instead of hash->USER_KEY
|
# user-key instead of hash->USER_KEY
|
||||||
if ( $values{device} =~ /^([A-Za-z0-9]{30})?:?([A-Za-z0-9_-]*)?(.*)?$/ ) {
|
if ( $values{device} =~ /^(([A-Za-z0-9]{30}):)?([A-Za-z0-9,_-]*)(.*)$/ )
|
||||||
$values{USER_KEY} = $1 if ( $1 ne "" );
|
{
|
||||||
$values{device} = $2;
|
$values{USER_KEY} = $2 if ( $2 ne "" );
|
||||||
|
$values{device} = $3;
|
||||||
|
|
||||||
return $hash->{helper}{FAILED_USERKEYS}{ $values{USER_KEY} }
|
return $hash->{helper}{FAILED_USERKEYS}{ $values{USER_KEY} }
|
||||||
if ( $values{USER_KEY}
|
if ( $values{USER_KEY}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user