diff options
author | Guillermo Ramos | 2020-03-03 20:30:47 +0100 |
---|---|---|
committer | Guillermo Ramos | 2020-03-03 20:30:47 +0100 |
commit | 4c5babe735671ce8ec069ea4d110ae703c6a11bb (patch) | |
tree | 631e6e0442644725467fe747852d4e3be94d4f9d /lib/TgLib | |
parent | c109882cf3d666678f5091e3624f5dc9520682f9 (diff) | |
download | tgutils-4c5babe735671ce8ec069ea4d110ae703c6a11bb.tar.gz |
Don't show "Received 0 updates..."
Diffstat (limited to 'lib/TgLib')
-rw-r--r-- | lib/TgLib/Api.pm | 3 |
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; } } |