From 21d295e307296d4108f5bc6893908caa27b8130e Mon Sep 17 00:00:00 2001 From: Chinmoy Chakraborty Date: Thu, 14 Mar 2024 10:11:30 +0530 Subject: [PATCH] Only reject disabled bots. --- pom.xml | 2 +- src/main/java/com/uci/utils/bot/util/BotUtil.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index b972a6c..05d9e52 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ com.uci utils - 2.4.1 + 2.4.2 diff --git a/src/main/java/com/uci/utils/bot/util/BotUtil.java b/src/main/java/com/uci/utils/bot/util/BotUtil.java index b02ef83..d6b877e 100644 --- a/src/main/java/com/uci/utils/bot/util/BotUtil.java +++ b/src/main/java/com/uci/utils/bot/util/BotUtil.java @@ -22,13 +22,13 @@ @Slf4j public class BotUtil { - public static String botEnabledStatus = "enabled"; - public static String botLiveStatus = "live"; public static String adminUserId = "admin"; public static String transformerTypeBroadcast = "broadcast"; public static String transformerTypeGeneric = "generic"; + private static final String disabledStatus = "disabled"; + /** * Get true if bot is valid else invalid message, from json node data * @param data @@ -114,7 +114,7 @@ && checkBotEndDateValid(endDate) */ public static Boolean checkBotLiveStatus(String status) { status = status.toLowerCase(); - if(status.equals(botLiveStatus) || status.equals(botEnabledStatus)) { + if(!status.equals(disabledStatus)) { return true; } log.info("Bot is invalid as its status is not live or enabled.");