Enable replies on Twitter and Telegram
By default, when a product is available, a notification is sent. When that same product is not available, a reply is sent to the original message. With tons of notifications, replies might be seen as flooding. This commit adds an option to explicitly enable replies on Twitter and Telegram notifiers. By default, reply messages are disabled. Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
26eb0af9ea
commit
305b3eeb76
4 changed files with 41 additions and 31 deletions
|
|
@ -25,13 +25,15 @@ type TwitterConfig struct {
|
|||
AccessToken string `json:"access_token"`
|
||||
AccessTokenSecret string `json:"access_token_secret"`
|
||||
Hashtags []map[string]string `json:"hashtags"`
|
||||
EnableReplies bool `json:"enable_replies"`
|
||||
}
|
||||
|
||||
// TelegramConfig to store Telegram API key
|
||||
type TelegramConfig struct {
|
||||
Token string `json:"token"`
|
||||
ChatID int64 `json:"chat_id"`
|
||||
ChannelName string `json:"channel_name"`
|
||||
Token string `json:"token"`
|
||||
ChatID int64 `json:"chat_id"`
|
||||
ChannelName string `json:"channel_name"`
|
||||
EnableReplies bool `json:"enable_replies"`
|
||||
}
|
||||
|
||||
// ApiConfig to store HTTP API configuration
|
||||
|
|
|
|||
Reference in a new issue