Skip to content
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

Fix telegram webhooks #7236

Merged
merged 1 commit into from Apr 24, 2017

Conversation

Projects
None yet
3 participants
@MartinHjelmare
Copy link
Member

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
Fix telegram webhooks
* 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.

@MartinHjelmare MartinHjelmare added this to the 0.43.1 milestone Apr 23, 2017

@balloob balloob merged commit 0e662c4 into home-assistant:dev Apr 24, 2017

4 checks passed

cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 93.587%
Details
hound No violations found. Woof!
@balloob

This comment has been minimized.

Copy link
Member

commented Apr 25, 2017

Cherry picked for 0.43.1

balloob added a commit that referenced this pull request Apr 25, 2017

Fix telegram webhooks (#7236)
* 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 referenced this pull request Apr 25, 2017

Merged

0.43.1 #7288

@MartinHjelmare MartinHjelmare deleted the MartinHjelmare:fix-telegram-webhooks branch Apr 28, 2017

@balloob balloob referenced this pull request May 5, 2017

Merged

0.44 #7444

@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.
You can’t perform that action at this time.