Skip to content

fix: allow dynamic webhook registration after first request - #1778

Open
sijis wants to merge 2 commits into
errbotio:masterfrom
sijis:fix/webhook_handled_first_request
Open

fix: allow dynamic webhook registration after first request#1778
sijis wants to merge 2 commits into
errbotio:masterfrom
sijis:fix/webhook_handled_first_request

Conversation

@sijis

@sijis sijis commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

This should address issue reported in #1720.

  • Bypass Flask 2.2+ setupmethod restriction during dynamic plugin activation by resetting _got_first_request before add_url_rule.
  • Add regression tests covering post-first-requ.est routing and multi-webhook reloads.

sijis added 2 commits August 17, 2026 00:50
- Reset flask_app._got_first_request to allow registering new webhooks
  dynamically after the webserver has begun serving requests.
- Use for...else loop so all webhook methods are updated on reload
  rather than exiting after the first matched rule.

Fixes errbotio#1720
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