diff --git a/bot.go b/bot.go index 81160126..dfe45fd2 100644 --- a/bot.go +++ b/bot.go @@ -516,7 +516,7 @@ func (b *Bot) Send(to Recipient, what interface{}, options ...interface{}) (*Mes // SendAlbum sends multiple instances of media as a single message. // -// From all existing options, it only supports tb.Silent option. +// From all existing options, it only supports tb.Silent. func (b *Bot) SendAlbum(to Recipient, a Album, options ...interface{}) ([]Message, error) { if to == nil { return nil, ErrBadRecipient diff --git a/webhook.go b/webhook.go index a17a1c0b..e3f953ab 100644 --- a/webhook.go +++ b/webhook.go @@ -17,9 +17,9 @@ type WebhookTLS struct { // A WebhookEndpoint describes the endpoint to which telegram will send its requests. // This must be a public URL and can be a loadbalancer or something similar. If the -// endpoint uses TLS and the certificate is selfsigned you have to add the certificate +// endpoint uses TLS and the certificate is self-signed you have to add the certificate // path of this certificate so telegram will trust it. This field can be ignored if you -// have a trusted certifcate (letsencrypt, ...). +// have a trusted certificate (letsencrypt, ...). type WebhookEndpoint struct { PublicURL string Cert string @@ -28,13 +28,16 @@ type WebhookEndpoint struct { // A Webhook configures the poller for webhooks. It opens a port on the given // listen address. If TLS is filled, the listener will use the key and cert to open // a secure port. Otherwise it will use plain HTTP. +// // If you have a loadbalancer ore other infrastructure in front of your service, you // must fill the Endpoint structure so this poller will send this data to telegram. If // you leave these values empty, your local address will be sent to telegram which is mostly // not what you want (at least while developing). If you have a single instance of your // bot you should consider to use the LongPoller instead of a WebHook. +// // You can also leave the Listen field empty. In this case it is up to the caller to // add the Webhook to a http-mux. +// type Webhook struct { Listen string `json:"url"` MaxConnections int `json:"max_connections"`