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

Separate start_webhook and setWebhook #114

Closed
wants to merge 3 commits into from
Closed

Separate start_webhook and setWebhook #114

wants to merge 3 commits into from

Conversation

Balduro
Copy link

@Balduro Balduro commented Dec 1, 2015

I think starting and setting a webhook should be separated tasks.
It adds more flexibility when you want to access through apache etc.

Gerd Augsburg added 3 commits December 1, 2015 14:11
I think starting and setting the webhook should be two different tasks.
Because the internal webhook and the adress you see from outside can be
quite diffrent through apache etc. It provides more flexibility.
@jh0ker
Copy link
Member

jh0ker commented Dec 1, 2015

I see, i forgot that the webhook needs to be specified by the user when using apache. We could just add a parameter to start_webhook, like custom_webhook_url or something. Wouldn't that be easier?

Edit: That's what you're doing, yes... Sorry, my mind was occupied. I will review this later today. Thank you for your contribution :)

@Balduro
Copy link
Author

Balduro commented Dec 1, 2015

why do two diffrent tasks in one funktion?
is:
start_webhook(network, port, path)
bot.setWebhook("https://server.tld/path/as/seen/from/outside", "path/to/cert")

realy harder than one bloated start_webhook call?
It gets cleaner, additionaly: when you restart your program (after crash or something like this)
you dont have to set the webhook again and again.
I think telegramm would always appreciate less calls.

@jh0ker
Copy link
Member

jh0ker commented Dec 1, 2015

You're right 👍

@jh0ker
Copy link
Member

jh0ker commented Dec 1, 2015

I updated the code in the example bot and merged directly into master. Thanks a lot for your contribution :)

@jh0ker jh0ker closed this Dec 1, 2015
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants