aboutsummaryrefslogtreecommitdiff
path: root/lib/TgLib/Api.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/TgLib/Api.pm')
-rw-r--r--lib/TgLib/Api.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/TgLib/Api.pm b/lib/TgLib/Api.pm
index 1fe8d06..7a14ef3 100644
--- a/lib/TgLib/Api.pm
+++ b/lib/TgLib/Api.pm
@@ -40,7 +40,8 @@ sub get_updates {
map { utf8::encode($_->{'message'}{'text'}) if exists $_->{'message'}{'text'} } @$updates;
$logger->info(sprintf "Received %d updates from chats %s\n",
scalar(@$updates),
- join(", ", map { $_->{'message'}{'chat'}{'id'} } @$updates));
+ join(", ", map { $_->{'message'}{'chat'}{'id'} } @$updates))
+ if @$updates;
return $updates;
}
}