From 06acabf6feda094825aabbd0f9b31e246d1f63b4 Mon Sep 17 00:00:00 2001 From: Ayrat Hudaygulov Date: Mon, 4 Dec 2023 20:52:40 +0000 Subject: [PATCH] one more NPE fix --- src/VahterBanBot/Bot.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VahterBanBot/Bot.fs b/src/VahterBanBot/Bot.fs index 5bd29d7..ecd3251 100644 --- a/src/VahterBanBot/Bot.fs +++ b/src/VahterBanBot/Bot.fs @@ -64,7 +64,7 @@ let isBanAuthorized logger.LogWarning $"User {fromUsername} {fromUserId} tried to {banType} user {targetUsername} ({targetUserId}) from not allowed chat {chatUsername} ({chatId})" false // check that user is not trying to ban other admins - elif isBannedPersonAdmin botConfig message then + elif isBan && isBannedPersonAdmin botConfig message then logger.LogWarning $"User {fromUsername} ({fromUserId}) tried to {banType} admin {targetUsername} ({targetUserId}) in chat {chatUsername} ({chatId}" false else