Browse Source

Add additional stream + server info to stream started webhook. Closes #971

pull/976/head
Gabe Kangas 4 years ago
parent
commit
4f73da30a8
  1. 14
      core/webhooks/stream.go

14
core/webhooks/stream.go

@ -1,7 +1,17 @@
package webhooks package webhooks
import "github.com/owncast/owncast/models" import (
"github.com/owncast/owncast/core/data"
"github.com/owncast/owncast/models"
)
func SendStreamStatusEvent(eventType models.EventType) { func SendStreamStatusEvent(eventType models.EventType) {
SendEventToWebhooks(WebhookEvent{Type: eventType}) SendEventToWebhooks(WebhookEvent{
Type: eventType,
EventData: map[string]interface{}{
"name": data.GetServerName(),
"summary": data.GetServerSummary(),
"streamTitle": data.GetStreamTitle(),
},
})
} }

Loading…
Cancel
Save