feat(webhooks): add stream status to webhook (#2934)

Expand the payload sent for stream status webhooks. Closes #2881
This commit is contained in:
Gabe Kangas
2023-05-30 11:32:05 -07:00
committed by GitHub
parent b9508ba1c8
commit 209756fed3
5 changed files with 38 additions and 6 deletions
+13 -1
View File
@@ -17,6 +17,17 @@ import (
jsonpatch "gopkg.in/evanphx/json-patch.v5"
)
func fakeGetStatus() models.Status {
return models.Status{
Online: true,
ViewerCount: 5,
OverallMaxViewerCount: 420,
SessionMaxViewerCount: 69,
StreamTitle: "my stream",
VersionNumber: "1.2.3",
}
}
func TestMain(m *testing.M) {
dbFile, err := os.CreateTemp(os.TempDir(), "owncast-test-db.db")
if err != nil {
@@ -29,7 +40,8 @@ func TestMain(m *testing.M) {
panic(err)
}
InitWorkerPool()
SetupWebhooks(fakeGetStatus)
defer close(queue)
m.Run()