0

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

This commit is contained in:
Gabe Kangas 2021-04-29 17:04:33 -07:00
parent 7d50db09ec
commit 4f73da30a8

View File

@ -1,7 +1,17 @@
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) {
SendEventToWebhooks(WebhookEvent{Type: eventType})
SendEventToWebhooks(WebhookEvent{
Type: eventType,
EventData: map[string]interface{}{
"name": data.GetServerName(),
"summary": data.GetServerSummary(),
"streamTitle": data.GetStreamTitle(),
},
})
}