Allow passing paramenters from handlers to bot session middleware #1487
torikki-tou
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Completely impossible to get data from the event middlewares inside client middleware because it wors on diametrically opposite sides of the application. At the same time you can use contextvars to get contextual data inside request handler if it is available at the moment. Note that the API methods (and client session middlewares) can be called outside of the handlers and event middlewares (like getUpdates and getMe methods is called before other scopes can be caused) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I can populate request context in dispatcher middleware, can use data from that context in my handler but i completely lose it in my request middleware in my bot although it is still part of my event dispatching workflow
Code example:
Am i missing something? Or is it intended?
Beta Was this translation helpful? Give feedback.
All reactions