2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

70_Pushover.pm: Now returning undef, if set was successful and timestamp is casted to integer.

git-svn-id: https://svn.fhem.de/fhem/trunk@7252 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jbosecker 2014-12-18 12:51:22 +00:00
parent f27fb5cf92
commit f9bbcc2497

View File

@ -131,7 +131,7 @@ sub Pushover_HTTP_Call
{
if ($1 eq "1")
{
return "OK";
return undef;
}
elsif ($response =~ m/"errors":\[(.*)\]/)
{
@ -144,7 +144,7 @@ sub Pushover_HTTP_Call
}
else
{
return "Error: No known response"
return "Error: No known response\nResponse was: " . $response;
}
}
@ -271,7 +271,7 @@ sub Pushover_Set_Message
if (1 == $timestamp)
{
$body = $body . "&" . "timestamp=" . time();
$body = $body . "&" . "timestamp=" . int(time());
}
my $result = Pushover_HTTP_Call($hash, $body, $ssl);