1 changed files with 12 additions and 2 deletions
@ -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…
Reference in new issue