owncast/models/chatMessage.go

18 lines
429 B
Go
Raw Normal View History

package models
2020-05-24 02:57:49 +02:00
//ChatMessage represents a single chat message
type ChatMessage struct {
ClientID string `json:"-"`
Author string `json:"author"`
Body string `json:"body"`
Image string `json:"image"`
ID string `json:"id"`
MessageType string `json:"type"`
2020-05-24 02:57:49 +02:00
}
//Valid checks to ensure the message is valid
func (s ChatMessage) Valid() bool {
return s.Author != "" && s.Body != "" && s.ID != ""
}