Make IDs for chat messages generated server-side, not client. For #26

This commit is contained in:
Gabe Kangas
2020-06-24 22:00:49 -07:00
parent 5dffaf215b
commit a297e33eff
8 changed files with 11 additions and 19 deletions

View File

@ -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 != ""