status-go/protocol/requests/create_one_to_one_chat.go

22 lines
371 B
Go
Raw Normal View History

2021-01-11 10:32:51 +00:00
package requests
import (
"errors"
"github.com/status-im/status-go/eth-node/types"
)
var ErrCreateOneToOneChatInvalidID = errors.New("create-one-to-one-chat: invalid id")
type CreateOneToOneChat struct {
2021-05-14 10:55:42 +00:00
ID types.HexBytes `json:"id"`
2021-01-11 10:32:51 +00:00
}
2021-05-14 10:55:42 +00:00
func (c *CreateOneToOneChat) Validate() error {
if len(c.ID) == 0 {
2021-01-11 10:32:51 +00:00
return ErrCreateOneToOneChatInvalidID
}
return nil
}