Skip to content

[BUG] NewWebhookWithCert Never Upload CertFile #411

@zu1k

Description

@zu1k

When Use NewWebhookWithCert , I need to specify URL.

func NewWebhookWithCert(link string, file interface{}) WebhookConfig {
	u, _ := url.Parse(link)

	return WebhookConfig{
		URL:         u,
		Certificate: file,
	}
}

However, when specify URL, the cert file will never be uploaded

https://github.com/go-telegram-bot-api/telegram-bot-api/blob/bot-api-5.0/configs.go#L948

func (config WebhookConfig) useExistingFile() bool {
	return config.URL != nil
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions