JungDev / django-telegrambot

Simple app for Telegram bot in Django
BSD 3-Clause "New" or "Revised" License
237 stars 88 forks source link

ALLOWED_UPDATES not working in WEBHOOK mode. #7

Open TheHolyLoli opened 6 years ago

TheHolyLoli commented 6 years ago

OS: Windows 10 using django-sslserver to run https server.(Not really related i think.)

i have 'ALLOWED_UPDATES': ['message'] but when i run the django app,and do webHookInfo , ALLOWED_UPDATES is not updated(its using the previous value).but it changes if i have a empty list,meaning it changes to "ALL" updates. if i use POLLING mode,the allowed_updates get changed every time i run the app.

JungDev commented 6 years ago

I think can be a fail to setWebhook, do you can check if setted is true or not here https://github.com/JungDev/django-telegrambot/blob/master/django_telegrambot/apps.py#L175 ?

Ports currently supported for Webhooks by Telegram are 443, 80, 88, 8443. Do you use one of this with django-sslserver? If not this can be cause of fail in setWebhook.

TheHolyLoli commented 6 years ago

setted=True port is 443 in django-sslserver

2017-10-18 20:07:07,171 [INFO] django_telegrambot.apps: Telegram Bot <*> setting webhook [ ** ] max connections:40 allowed updates:['ALL'] pending updates:0 : True

and 'ALLOWED_UPDATES': ['message',],

python 3.6,django 1.11

so,if its a fail in setwebhook... why setted is True?