status-go/protocol/requests/check_all_community_channels_permissions.go
Pascal Precht bf64f97d5a feat: introduce CheckAllCommunityChannelsPermissions() API
This API is used to get a permission status of all channels of a given
community.

Clients can use this API to get the provided information for all
community channels with a single RPC call instead of doing one call
for each channel separately.
2023-06-20 10:06:44 +02:00

24 lines
467 B
Go

package requests
import (
"errors"
"github.com/status-im/status-go/eth-node/types"
)
var (
ErrCheckAllCommunityChannelsPermissionsInvalidID = errors.New("check-community-channel-permissions: invalid id")
)
type CheckAllCommunityChannelsPermissions struct {
CommunityID types.HexBytes
}
func (u *CheckAllCommunityChannelsPermissions) Validate() error {
if len(u.CommunityID) == 0 {
return ErrCheckAllCommunityChannelsPermissionsInvalidID
}
return nil
}