Config repository (#3988)
* WIP * fix(test): fix ap test failing * fix: fix unkeyed fields being used * chore(tests): clean up browser tests by splitting out federation UI tests
This commit is contained in:
@@ -3,8 +3,8 @@ package webhooks
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/owncast/owncast/core/data"
|
||||
"github.com/owncast/owncast/models"
|
||||
"github.com/owncast/owncast/persistence/configrepository"
|
||||
"github.com/teris-io/shortid"
|
||||
)
|
||||
|
||||
@@ -14,13 +14,15 @@ func SendStreamStatusEvent(eventType models.EventType) {
|
||||
}
|
||||
|
||||
func sendStreamStatusEvent(eventType models.EventType, id string, timestamp time.Time) {
|
||||
configRepository := configrepository.Get()
|
||||
|
||||
SendEventToWebhooks(WebhookEvent{
|
||||
Type: eventType,
|
||||
EventData: map[string]interface{}{
|
||||
"id": id,
|
||||
"name": data.GetServerName(),
|
||||
"summary": data.GetServerSummary(),
|
||||
"streamTitle": data.GetStreamTitle(),
|
||||
"name": configRepository.GetServerName(),
|
||||
"summary": configRepository.GetServerSummary(),
|
||||
"streamTitle": configRepository.GetStreamTitle(),
|
||||
"status": getStatus(),
|
||||
"timestamp": timestamp,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user