From 8404844cf308858b621e1495cb163437056ab7a0 Mon Sep 17 00:00:00 2001 From: ruri Date: Sat, 7 Sep 2019 17:22:13 +0200 Subject: [PATCH] Fixed last commit to only send the hit on SUCCESS or CUSTOM status. --- RuriLib/Runner/RunnerViewModel.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/RuriLib/Runner/RunnerViewModel.cs b/RuriLib/Runner/RunnerViewModel.cs index 797652c..1813ba5 100644 --- a/RuriLib/Runner/RunnerViewModel.cs +++ b/RuriLib/Runner/RunnerViewModel.cs @@ -864,14 +864,13 @@ namespace RuriLib.Runner } // Call the webhook - if (Settings.General.WebhookEnabled) + if (Settings.General.WebhookEnabled && (botData.Status == BotStatus.SUCCESS || botData.Status == BotStatus.CUSTOM)) { HttpRequest request = new HttpRequest(); try { var toSend = new WebhookFormat(data, hitType, capturedData.ToCaptureString(), DateTime.Now, Config.Settings.Name, Config.Settings.Author); var json = JsonConvert.SerializeObject(toSend); - //wc.UploadStringAsync(new Uri(Settings.General.WebhookURL), json); request.PostAsync(Settings.General.WebhookURL, json, "application/json"); } catch