mirror of
https://github.com/owncast/owncast.git
synced 2025-11-02 20:23:29 +08:00
Make IDs for chat messages generated server-side, not client. For #26
This commit is contained in:
@ -11,12 +11,6 @@ type ChatMessage struct {
|
||||
MessageType string `json:"type"`
|
||||
}
|
||||
|
||||
//String converts the chat message to string
|
||||
//TODO: is this required? or can we remove it
|
||||
func (s ChatMessage) String() string {
|
||||
return s.Author + " says " + s.Body
|
||||
}
|
||||
|
||||
//Valid checks to ensure the message is valid
|
||||
func (s ChatMessage) Valid() bool {
|
||||
return s.Author != "" && s.Body != "" && s.ID != ""
|
||||
|
||||
Reference in New Issue
Block a user