mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Fixed last commit to only send the hit on SUCCESS or CUSTOM status.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user