useCanAddMembersToChannel

Returns whether the current user can add members to the channel.

It checks for the update-channel-members capability via useChannelOwnCapabilities and reacts to capabilities.changed events.

Best Practices

  • Use this hook to show or hide "Add members" affordances on channel details and member-management screens.
  • Treat the result as the single source of truth for the add-members permission rather than duplicating the capability check.
  • The hook returns false when capabilities are unavailable, so it is safe to render-gate on directly.

Usage

import { useCanAddMembersToChannel } from "stream-chat-react-native";

const canAddMembers = useCanAddMembersToChannel(channel);

Parameters

NameTypeRequiredDescription
channelChannelNoChannel to evaluate for add-members permission.

Returns

TypeDescription
booleanWhether the current user can add members to the channel.