Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Give stream status webhooks an id and timestamp

Gabe Kangasf14895c74eb0
diff --git a/core/webhooks/stream.go b/core/webhooks/stream.go
index 4408953bd8..be031e17e6 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(),
},
})
}