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:
@@ -1,6 +1,8 @@
|
||||
package events
|
||||
|
||||
import "github.com/owncast/owncast/core/data"
|
||||
import (
|
||||
"github.com/owncast/owncast/persistence/configrepository"
|
||||
)
|
||||
|
||||
// SystemMessageEvent is a message displayed in chat on behalf of the server.
|
||||
type SystemMessageEvent struct {
|
||||
@@ -10,13 +12,15 @@ type SystemMessageEvent struct {
|
||||
|
||||
// GetBroadcastPayload will return the object to send to all chat users.
|
||||
func (e *SystemMessageEvent) GetBroadcastPayload() EventPayload {
|
||||
configRepository := configrepository.Get()
|
||||
|
||||
return EventPayload{
|
||||
"id": e.ID,
|
||||
"timestamp": e.Timestamp,
|
||||
"body": e.Body,
|
||||
"type": SystemMessageSent,
|
||||
"user": EventPayload{
|
||||
"displayName": data.GetServerName(),
|
||||
"displayName": configRepository.GetServerName(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user