Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for callback queries in Telegram webhook #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Oussail
Copy link

@Oussail Oussail commented Sep 24, 2024

Hi I have updated the server.js code to handle both message and callback query types from Telegram. This allows the bot to process both direct text messages and inputs from inline keyboard interactions. Modified the detectIntentResponse function to differentiate between message types and extract the necessary session information and text inputs accordingly. Also adjusted the POST endpoint logic to correctly handle different request formats and send appropriate responses.

Copy link
Author

@Oussail Oussail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is working well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant