Skip to content

Commit

Permalink
Merge pull request #643 from UnitapApp/feature/telegram/implementation
Browse files Browse the repository at this point in the history
added logs for debugging
  • Loading branch information
alimaktabi authored Oct 26, 2024
2 parents 23537f7 + 5e3dabf commit 47014e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions telegram/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

import telebot
import requests
import logging


logger = logging.getLogger(__name__)


def get_telegram_safe_ips():
Expand All @@ -42,6 +46,8 @@ def telebot_respond(request):
# if client_ip not in telegram_ips:
# raise PermissionDenied("Invalid IP address")

logger.info(request.headers)

if (
request.headers.get("X-Telegram-Bot-Api-Secret-Token")
!= settings.TELEGRAM_BOT_API_SECRET
Expand Down

0 comments on commit 47014e8

Please sign in to comment.