app state fix
This commit is contained in:
@@ -30,12 +30,14 @@ async def telegram_webhook(
|
|||||||
logger.error("Invalid request", exc_info=True)
|
logger.error("Invalid request", exc_info=True)
|
||||||
return Response(status_code=400)
|
return Response(status_code=400)
|
||||||
try:
|
try:
|
||||||
|
state_kw = request.state._state #TODO: avoid accessing private attribute
|
||||||
|
|
||||||
await app.dp.feed_webhook_update(
|
await app.dp.feed_webhook_update(
|
||||||
app.bot,
|
app.bot,
|
||||||
update,
|
update,
|
||||||
db_session=db_session,
|
db_session=db_session,
|
||||||
app=app,
|
app=app,
|
||||||
**(request.state if request.state else {}),
|
**(state_kw or {}),
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.error("Error processing update", exc_info=True)
|
logger.error("Error processing update", exc_info=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user