Skip to content

Commit

Permalink
fix: health check availability
Browse files Browse the repository at this point in the history
  • Loading branch information
ovchynnikov committed Jan 29, 2025
1 parent 38fc14a commit 9785339
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE): #

message_text = update.message.text.strip()

# Ignore if message doesn't contain http
if "http" not in message_text:
return

# Handle bot mention response
if "ботяра" in message_text.lower() or "bot_health" in message_text.lower():
await update.message.reply_text(
Expand All @@ -112,6 +108,10 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE): #
)
return

# Ignore if message doesn't contain http
if "http" not in message_text:
return

# Check if user is not allowed
if is_user_or_chat_not_allowed(update.effective_user.username, update.effective_chat.id):
if update.effective_chat.type == "private":
Expand Down

0 comments on commit 9785339

Please sign in to comment.