Skip to content

Commit

Permalink
Only reject disabled bots.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmoy12c committed Mar 14, 2024
1 parent e9cc797 commit 21d295e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<groupId>com.uci</groupId>
<artifactId>utils</artifactId>
<!--For Development we are using SNAPSHOT with version-->
<version>2.4.1</version>
<version>2.4.2</version>

<!-- On changing, Set version in build-deploy.yml to delete the previous packages if exists and deploy new package for the specified version -->

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/uci/utils/bot/util/BotUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.");
Expand Down

0 comments on commit 21d295e

Please sign in to comment.