2023-04-25 12:00:17 +00:00
|
|
|
package requests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
|
|
|
|
"github.com/status-im/status-go/eth-node/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
ErrCheckPermissionToJoinCommunityInvalidID = errors.New("check-permission-to-join-community: invalid id")
|
|
|
|
)
|
|
|
|
|
|
|
|
type CheckPermissionToJoinCommunity struct {
|
2023-08-15 17:26:23 +00:00
|
|
|
CommunityID types.HexBytes `json:"communityId"`
|
|
|
|
Addresses []string `json:"addresses"`
|
2023-04-25 12:00:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (u *CheckPermissionToJoinCommunity) Validate() error {
|
|
|
|
if len(u.CommunityID) == 0 {
|
|
|
|
return ErrCheckPermissionToJoinCommunityInvalidID
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|