diff --git a/telegram/ext/updater.py b/telegram/ext/updater.py index d770f7fe6..705c0b195 100644 --- a/telegram/ext/updater.py +++ b/telegram/ext/updater.py @@ -301,11 +301,12 @@ class Updater(object): if use_ssl: self._check_ssl_cert(cert, key) - if not webhook_url: - webhook_url = self._gen_webhook_url(listen, port, url_path) + # DO NOT CHANGE: Only set webhook if SSL is handled by library + if not webhook_url: + webhook_url = self._gen_webhook_url(listen, port, url_path) - self._set_webhook(webhook_url, bootstrap_retries, - open(cert, 'rb') if use_ssl else None) + self._set_webhook(webhook_url, bootstrap_retries, + open(cert, 'rb')) self.httpd.serve_forever(poll_interval=1)