feat(notifications): add title field to template data (#1125)

This commit is contained in:
nils måsén 2022-01-05 12:08:47 +01:00 committed by GitHub
parent 1d59fb83dd
commit aa02d8d31b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 94 additions and 35 deletions

View file

@ -62,7 +62,7 @@ func getGotifyURL(flags *pflag.FlagSet) string {
return gotifyURL
}
func (n *gotifyTypeNotifier) GetURL(c *cobra.Command) (string, error) {
func (n *gotifyTypeNotifier) GetURL(c *cobra.Command, title string) (string, error) {
apiURL, err := url.Parse(n.gotifyURL)
if err != nil {
return "", err
@ -72,7 +72,7 @@ func (n *gotifyTypeNotifier) GetURL(c *cobra.Command) (string, error) {
Host: apiURL.Host,
Path: apiURL.Path,
DisableTLS: apiURL.Scheme == "http",
Title: GetTitle(c),
Title: title,
Token: n.gotifyAppToken,
}