status-go/protocol/requests/create_public_chat.go

20 lines
301 B
Go
Raw Normal View History

2021-03-25 16:15:22 +01:00
package requests
import (
"errors"
)
var ErrCreatePublicChatInvalidID = errors.New("create-public-chat: invalid id")
type CreatePublicChat struct {
2021-05-14 12:55:42 +02:00
ID string `json:"id"`
2021-03-25 16:15:22 +01:00
}
2021-05-14 12:55:42 +02:00
func (c *CreatePublicChat) Validate() error {
if len(c.ID) == 0 {
2021-03-25 16:15:22 +01:00
return ErrCreatePublicChatInvalidID
}
return nil
}