Skip to content

Commit

Permalink
fix(telegram): don't error when title prop is set
Browse files Browse the repository at this point in the history
  • Loading branch information
piksel committed Apr 20, 2021
1 parent b8c4d0c commit 7e5429b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/services/telegram/telegram_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type Config struct {
Notification bool `key:"notification" default:"Yes" desc:"If disabled, sends message silently"`
ParseMode parseMode `key:"parsemode" default:"None" desc:"How the text message should be parsed"`
Channels []string `key:"channels"`
Title string `key:"title" default:"" desc:"notification title, optionally set by the sender"`
}

// Enums returns the fields that should use a corresponding EnumFormatter to Print/Parse their values
Expand Down
2 changes: 1 addition & 1 deletion pkg/services/telegram/telegram_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ var _ = Describe("the telegram service", func() {
testutils.TestConfigSetInvalidQueryValue(&Config{}, "telegram://12345:mock-token@telegram/?channels=channel-1&foo=bar")

testutils.TestConfigGetEnumsCount(&Config{}, 1)
testutils.TestConfigGetFieldsCount(&Config{}, 4)
testutils.TestConfigGetFieldsCount(&Config{}, 5)
})
})

Expand Down

0 comments on commit 7e5429b

Please sign in to comment.