Rearrange params in Apprise

pull/1606/head
Bogdan 1 year ago
parent 2015156061
commit c8addc0d62

@ -17,19 +17,19 @@ namespace NzbDrone.Core.Notifications.Apprise
_proxy = proxy;
}
public override void OnGrab(GrabMessage message)
public override void OnGrab(GrabMessage grabMessage)
{
_proxy.SendNotification(Settings, RELEASE_GRABBED_TITLE_BRANDED, $"{message.Message}");
_proxy.SendNotification(RELEASE_GRABBED_TITLE_BRANDED, grabMessage.Message, Settings);
}
public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
{
_proxy.SendNotification(Settings, HEALTH_ISSUE_TITLE_BRANDED, $"{healthCheck.Message}");
_proxy.SendNotification(HEALTH_ISSUE_TITLE_BRANDED, healthCheck.Message, Settings);
}
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
{
_proxy.SendNotification(Settings, APPLICATION_UPDATE_TITLE_BRANDED, $"{updateMessage.Message}");
_proxy.SendNotification(APPLICATION_UPDATE_TITLE_BRANDED, updateMessage.Message, Settings);
}
public override ValidationResult Test()

@ -1,5 +1,3 @@
using Newtonsoft.Json;
namespace NzbDrone.Core.Notifications.Apprise
{
public class ApprisePayload

@ -11,7 +11,7 @@ namespace NzbDrone.Core.Notifications.Apprise
{
public interface IAppriseProxy
{
void SendNotification(AppriseSettings settings, string title, string message);
void SendNotification(string title, string message, AppriseSettings settings);
ValidationFailure Test(AppriseSettings settings);
}
@ -26,7 +26,7 @@ namespace NzbDrone.Core.Notifications.Apprise
_logger = logger;
}
public void SendNotification(AppriseSettings settings, string title, string message)
public void SendNotification(string title, string message, AppriseSettings settings)
{
var payload = new ApprisePayload
{
@ -85,7 +85,7 @@ namespace NzbDrone.Core.Notifications.Apprise
try
{
SendNotification(settings, title, body);
SendNotification(title, body, settings);
}
catch (AppriseException ex) when (ex.InnerException is HttpException httpException)
{

Loading…
Cancel
Save