Skip to content

Commit

Permalink
bugfix JungDev#6 fix Flood Error
Browse files Browse the repository at this point in the history
  • Loading branch information
marqueewinq committed Oct 13, 2017
1 parent ed267cf commit feb5a2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions django_telegrambot/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def getUpdater(cls, id=None, safe=True):
def ready(self):
if DjangoTelegramBot.ready_run:
return
#DjangoTelegramBot.ready_run = True
DjangoTelegramBot.ready_run = True

self.mode = WEBHOOK_MODE
if settings.DJANGO_TELEGRAMBOT.get('MODE', 'WEBHOOK') == 'POLLING':
Expand Down Expand Up @@ -171,8 +171,8 @@ def ready(self):
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)
if bot.getWebhookInfo().url != hookurl:
setted = bot.setWebhook(hookurl, certificate=certificate, timeout=timeout, max_connections=max_connections, allowed_updates=allowed_updates)
webhook_info = bot.getWebhookInfo()
real_allowed = webhook_info.allowed_updates if webhook_info.allowed_updates else ["ALL"]

Expand Down

0 comments on commit feb5a2d

Please sign in to comment.