status-go/protocol/requests/mute_chat_request.go

27 lines
384 B
Go
Raw Permalink Normal View History

2023-04-16 15:06:00 +00:00
package requests
import (
"errors"
)
var ErrInvalidMuteChatParams = errors.New("mute-chat: invalid params")
type MutingVariation int
type MuteChat struct {
ChatID string
MutedType MutingVariation
}
func (a *MuteChat) Validate() error {
if len(a.ChatID) == 0 {
return ErrInvalidMuteChatParams
}
if a.MutedType < 0 {
return ErrInvalidMuteChatParams
}
return nil
}