chore(go): new chat message db repository. Closes #3081 (#4161)

This commit is contained in:
Gabe Kangas
2025-01-20 16:32:25 -08:00
committed by GitHub
parent db0ddfe009
commit c1f4096e11
15 changed files with 604 additions and 507 deletions

View File

@@ -5,8 +5,8 @@ import (
"net/http"
"github.com/owncast/owncast/config"
"github.com/owncast/owncast/core/chat"
"github.com/owncast/owncast/models"
"github.com/owncast/owncast/persistence/chatmessagerepository"
"github.com/owncast/owncast/persistence/configrepository"
"github.com/owncast/owncast/persistence/userrepository"
"github.com/owncast/owncast/utils"
@@ -33,7 +33,8 @@ func getChatMessages(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case http.MethodGet:
messages := chat.GetChatHistory()
chatMessageRepository := chatmessagerepository.Get()
messages := chatMessageRepository.GetChatHistory()
if err := json.NewEncoder(w).Encode(messages); err != nil {
log.Debugln(err)