aboutsummaryrefslogtreecommitdiff
path: root/tgsend
diff options
context:
space:
mode:
Diffstat (limited to 'tgsend')
-rwxr-xr-xtgsend2
1 files changed, 1 insertions, 1 deletions
diff --git a/tgsend b/tgsend
index 62aa347..c94df32 100755
--- a/tgsend
+++ b/tgsend
@@ -50,7 +50,7 @@ $text =~ s/^\s+|\s+$//g; # Trim input
# Send message to chats (or pretend to)
if ($PRETEND) {
$logger->info("(prentend) Sending to $_: '$text'\n") foreach @ARGV;
-} else {
+} elsif (length $text > 0) {
my $api = TgLib::Api->new($TOKEN, $logger);
$api->send_message($_, $text) foreach @ARGV;
}