fixed issue not responding to callback updates
This commit is contained in:
@@ -25,10 +25,8 @@ async def telegram_webhook(request: Request):
|
|||||||
|
|
||||||
update = telebot.types.Update.de_json(json_data)
|
update = telebot.types.Update.de_json(json_data)
|
||||||
|
|
||||||
# Process the update directly instead of using process_new_updates
|
# Process ALL types of updates (messages, callback queries, etc.)
|
||||||
if update.message:
|
|
||||||
try:
|
try:
|
||||||
# Call your message handlers directly
|
|
||||||
bot.process_new_updates([update])
|
bot.process_new_updates([update])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error processing update: {e}")
|
logger.error(f"Error processing update: {e}")
|
||||||
|
|||||||
Reference in New Issue
Block a user