More strict check of redis message json format

This commit is contained in:
eleksir
2022-04-18 23:19:19 +03:00
parent 391b9889cf
commit 33ab2a368d
3 changed files with 12 additions and 2 deletions

View File

@@ -71,6 +71,10 @@ sub __cron {
if ($hour == 8 && ($min >= 0 && $min <= 14)) {
foreach my $enabledfortunechat (FortuneToggleList ()) {
# Set it to strings, explicitly
next unless (defined $enabledfortunechat);
next if ("$enabledfortunechat" eq '');
next if ("$enabledfortunechat" eq '0');
$rmsg->{userid} = "$enabledfortunechat";
$rmsg->{chatid} = "$enabledfortunechat";