mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix Telegram webhook registration if deregistration previously failed (#133398)
This commit is contained in:
parent
b16c3a55a5
commit
52dc124cfe
@ -109,13 +109,12 @@ class PushBot(BaseTelegramBotEntity):
|
||||
else:
|
||||
_LOGGER.debug("telegram webhook status: %s", current_status)
|
||||
|
||||
if current_status and current_status["url"] != self.webhook_url:
|
||||
result = await self._try_to_set_webhook()
|
||||
if result:
|
||||
_LOGGER.debug("Set new telegram webhook %s", self.webhook_url)
|
||||
else:
|
||||
_LOGGER.error("Set telegram webhook failed %s", self.webhook_url)
|
||||
return False
|
||||
result = await self._try_to_set_webhook()
|
||||
if result:
|
||||
_LOGGER.debug("Set new telegram webhook %s", self.webhook_url)
|
||||
else:
|
||||
_LOGGER.error("Set telegram webhook failed %s", self.webhook_url)
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user