diff --git a/src/NzbDrone.Core/Notifications/Telegram/TelegramService.cs b/src/NzbDrone.Core/Notifications/Telegram/TelegramService.cs index 6c43a7292..675714227 100644 --- a/src/NzbDrone.Core/Notifications/Telegram/TelegramService.cs +++ b/src/NzbDrone.Core/Notifications/Telegram/TelegramService.cs @@ -38,6 +38,7 @@ namespace NzbDrone.Core.Notifications.Telegram .AddFormParameter("chat_id", settings.ChatId) .AddFormParameter("parse_mode", "HTML") .AddFormParameter("text", text) + .AddFormParameter("disable_notification", settings.SendSilently) .Build(); _httpClient.Post(request); diff --git a/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs b/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs index 58f04709e..051691c92 100644 --- a/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs +++ b/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs @@ -24,7 +24,8 @@ namespace NzbDrone.Core.Notifications.Telegram [FieldDefinition(1, Label = "Chat ID", HelpLink = "http://stackoverflow.com/a/37396871/882971", HelpText = "You must start a conversation with the bot or add it to your group to receive messages")] public string ChatId { get; set; } - public bool IsValid => !string.IsNullOrWhiteSpace(ChatId) && !string.IsNullOrWhiteSpace(BotToken); + [FieldDefinition(2, Label = "Send Silently", Type = FieldType.Checkbox, HelpText = "Sends the message silently. Users will receive a notification with no sound")] + public bool SendSilently { get; set; } public NzbDroneValidationResult Validate() {