8000 Fix telegram webhooks by MartinHjelmare · Pull Request #7236 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix telegram webhooks #7236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2017

Conversation

MartinHjelmare
Copy link
Member
@MartinHjelmare MartinHjelmare commented Apr 23, 2017

Description:

  • Always register the view if a webhook exists.
  • Return True if platform is set up succesfully, False otherwise.
  • Remove the webhook when home assistant stops. Webhooks and long polling are mutually exclusive. If a webhook is left after home assistant is stopped, a polling telegram bot is unable to be set up, on next start of home assistant. See for more info: https://core.telegram.org/bots/api#getting-updates

Example entry for configuration.yaml (if applicable):

telegram_bot:
  platform: webhooks
  api_key: telegram api key
  allowed_chat_ids:
    - 12345
    - 67890

Checklist:

If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

* Always register the view if a webhook exists.
* Return True if platform is set up succesfully, False otherwise.
* Remove the webhook when home assistant stops. Webhooks and long
  polling are mutually excklusive. If a webhook is left after home
  assistant is stopped, a polling telegram bot is unable to be set up,
  on next start of home assistant.
@balloob
Copy link
Member
balloob commented Apr 25, 2017

Cherry picked for 0.43.1

balloob pushed a commit that referenced this pull request Apr 25, 2017
* Always register the view if a webhook exists.
* Return True if platform is set up succesfully, False otherwise.
* Remove the webhook when home assistant stops. Webhooks and long
  polling are mutually excklusive. If a webhook is left after home
  assistant is stopped, a polling telegram bot is unable to be set up,
  on next start of home assistant.
@balloob balloob mentioned this pull request Apr 25, 2017
@MartinHjelmare MartinHjelmare deleted the fix-telegram-webhooks branch April 28, 2017 20:12
@balloob balloob mentioned this pull request May 5, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Aug 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0