From 9d0ae44c3cfaf509438004fd53072a264570b510 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 12 Aug 2021 20:02:17 -0700 Subject: [PATCH] Give stream status webhooks an id and timestamp --- core/webhooks/stream.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/webhooks/stream.go b/core/webhooks/stream.go index 4408953bd..be031e17e 100644 --- a/core/webhooks/stream.go +++ b/core/webhooks/stream.go @@ -1,17 +1,22 @@ package webhooks import ( + "time" + "github.com/owncast/owncast/core/data" "github.com/owncast/owncast/models" + "github.com/teris-io/shortid" ) func SendStreamStatusEvent(eventType models.EventType) { SendEventToWebhooks(WebhookEvent{ Type: eventType, EventData: map[string]interface{}{ + "id": shortid.MustGenerate(), "name": data.GetServerName(), "summary": data.GetServerSummary(), "streamTitle": data.GetStreamTitle(), + "timestamp": time.Now(), }, }) }