Skip to content

Commit

Permalink
context for webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
lukruh authored Mar 7, 2020
1 parent 9bf5fce commit 24e01ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_telegrambot/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def ready(self):
request = Request(proxy_url=proxy['proxy_url'], urllib3_proxy_kwargs=proxy['urllib3_proxy_kwargs'])
bot = telegram.Bot(token=token, request=request)

DjangoTelegramBot.dispatchers.append(Dispatcher(bot, None, workers=0))
DjangoTelegramBot.dispatchers.append(Dispatcher(bot, None, workers=0, use_context=context))
hookurl = '{}/{}/{}/'.format(webhook_site, webhook_base, token)
max_connections = b.get('WEBHOOK_MAX_CONNECTIONS', 40)
setted = bot.setWebhook(hookurl, certificate=certificate, timeout=timeout, max_connections=max_connections, allowed_updates=allowed_updates)
Expand Down

0 comments on commit 24e01ce

Please sign in to comment.