github.com/status-im/status-go@v1.1.0/protocol/requests/deactivate_chat.go (about) 1 package requests 2 3 import ( 4 "errors" 5 ) 6 7 var ErrDeactivateChatInvalidID = errors.New("deactivate-chat: invalid id") 8 9 type DeactivateChat struct { 10 ID string `json:"id"` 11 PreserveHistory bool `json:"preserveHistory"` 12 } 13 14 func (j *DeactivateChat) Validate() error { 15 if len(j.ID) == 0 { 16 return ErrDeactivateChatInvalidID 17 } 18 19 return nil 20 }