global-functions: $SendTelegram: invert condition

This commit is contained in:
Christian Hesse 2020-03-05 10:59:13 +01:00
parent 34db2e34db
commit 227151e189

View file

@ -438,7 +438,10 @@
:set ChatId $TelegramChatIdOverride;
}
:if ([ :len $TelegramTokenId ] > 0 && [ :len $ChatId ] > 0) do={
:if ([ :len $TelegramTokenId ] = 0 || [ :len $ChatId ] = 0) do={
:return;
}
$CertificateAvailable "Go Daddy Secure Certificate Authority - G2";
:do {
/ tool fetch check-certificate=yes-without-crl output=none http-method=post \
@ -448,7 +451,6 @@
} on-error={
:log warning "Failed sending telegram notification!";
}
}
}
# check if system time is sync