mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
Fix unwanted disabling webhook when skip_updates is enabled.
This commit is contained in:
parent
d2c5896b5c
commit
e04c4d05da
1 changed files with 3 additions and 3 deletions
|
|
@ -11,15 +11,15 @@ async def _startup(dispatcher: Dispatcher, skip_updates=False, callback=None):
|
|||
user = await dispatcher.bot.me
|
||||
log.info(f"Bot: {user.full_name} [@{user.username}]")
|
||||
|
||||
if callable(callback):
|
||||
await callback(dispatcher)
|
||||
|
||||
if skip_updates:
|
||||
await dispatcher.reset_webhook(True)
|
||||
count = await dispatcher.skip_updates()
|
||||
if count:
|
||||
log.warning(f"Skipped {count} updates.")
|
||||
|
||||
if callable(callback):
|
||||
await callback(dispatcher)
|
||||
|
||||
|
||||
async def _wh_startup(app):
|
||||
callback = app.get('_startup_callback', None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue