aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Integrations/Webhooks/WebhookService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/slskd/Integrations/Webhooks/WebhookService.cs')
-rw-r--r--src/slskd/Integrations/Webhooks/WebhookService.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/slskd/Integrations/Webhooks/WebhookService.cs b/src/slskd/Integrations/Webhooks/WebhookService.cs
index b08b0484..62739d7a 100644
--- a/src/slskd/Integrations/Webhooks/WebhookService.cs
+++ b/src/slskd/Integrations/Webhooks/WebhookService.cs
@@ -94,7 +94,10 @@ public class WebhookService
}
var content = new StringContent(
- content: JsonSerializer.Serialize(data, JsonSerializerOptions),
+ content: JsonSerializer.Serialize(
+ value: data,
+ inputType: data.GetType(), // if omitted object is serialized as EventType, losing everything else
+ options: JsonSerializerOptions),
encoding: Encoding.UTF8,
mediaType: "application/json");