Refactor Telegram bot and web application for improved functionality
- Disabled the default menu button in the Telegram bot, allowing users to access the app via a direct link. - Updated the initData validation process to ensure URL-decoded values are used in the data-check string. - Enhanced error handling in the web application to provide more informative access denial messages. - Removed unnecessary debug information from the access denied section in the web app. - Cleaned up the web application code by removing unused functions and improving CSS styles for hidden elements.
This commit is contained in:
3
main.py
3
main.py
@@ -61,7 +61,8 @@ def _run_uvicorn(web_app, port: int) -> None:
|
||||
|
||||
|
||||
def main() -> None:
|
||||
_set_default_menu_button_webapp()
|
||||
# Menu button (Календарь) and inline Calendar button are disabled; users open the app by link if needed.
|
||||
# _set_default_menu_button_webapp()
|
||||
app = ApplicationBuilder().token(config.BOT_TOKEN).build()
|
||||
register_handlers(app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user