-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Added support for custom Telegram proxy host #29648
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
base: main
Are you sure you want to change the base?
Conversation
Please speak in English. |
Done |
How about convert it into custom host which contains both domain and protocol |
Hi @yp05327 |
I know your needs. |
a0e90c2
to
514d558
Compare
@yp05327 Good idea, I didn't consider that there are still some people using http. I've already updated the relevant code. |
514d558
to
0603f10
Compare
@@ -425,15 +425,19 @@ func TelegramHooksEditPost(ctx *context.Context) { | |||
func telegramHookParams(ctx *context.Context) webhookParams { | |||
form := web.GetForm(ctx).(*forms.NewTelegramHookForm) | |||
|
|||
if form.CustomHost == "" { | |||
form.CustomHost = "https://api.telegram.org" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convert the default server host into a const. and add it to ctx.Data
, then we can use it in template.
Then there's no need to maintain both frontend and backend.
I've been thinking if this is the approach we should take (having an additional field in the webhook form for each telegram webhooks), there are a few other ways to achieve using a different host for telegram webhooks.
|
Sadly, this feature still doesn't seem to be incorporated |
There are still unresolved reviews. Is this PR still active? |
Added support for custom Telegram proxy domain names
In some specific environments, it supports defining the proxy or self-built domain name of the telegram bot API