mirror of
https://github.com/Sonarr/Sonarr
synced 2026-05-06 03:51:06 +02:00
parent
c77c65c68a
commit
9e392977b9
2 changed files with 3 additions and 1 deletions
|
|
@ -41,6 +41,7 @@ public void SendNotification(string title, string message, TelegramSettings sett
|
|||
request.AddParameter("chat_id", settings.ChatId);
|
||||
request.AddParameter("parse_mode", "HTML");
|
||||
request.AddParameter("text", text);
|
||||
request.AddParameter("disable_notification", settings.SendSilently);
|
||||
|
||||
client.ExecuteAndValidate(request);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ public class TelegramSettings : IProviderConfig
|
|||
[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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue