chore(api): add integration version of the status api. Closes #3981

This commit is contained in:
Gabe Kangas
2025-02-11 21:48:07 -08:00
parent 7b88b1099d
commit d4dec25129
6 changed files with 74 additions and 28 deletions

View File

@@ -12,6 +12,7 @@ import (
"strings"
"github.com/owncast/owncast/activitypub/outbox"
"github.com/owncast/owncast/core"
"github.com/owncast/owncast/core/chat"
"github.com/owncast/owncast/core/webhooks"
"github.com/owncast/owncast/models"
@@ -89,6 +90,12 @@ func ExternalSetStreamTitle(integration models.ExternalAPIUser, w http.ResponseW
SetStreamTitle(w, r)
}
// ExternalGetStatus will return the status of the server.
func ExternalGetStatus(integration models.ExternalAPIUser, w http.ResponseWriter, r *http.Request) {
status := core.GetStatus()
webutils.WriteResponse(w, status)
}
func sendSystemChatAction(messageText string, ephemeral bool) {
if err := chat.SendSystemAction(messageText, ephemeral); err != nil {
log.Errorln(err)