stream-chat-react-native-core
Version:
The official React Native and Expo components for Stream Chat, a service for building chat applications
10 lines (7 loc) • 334 B
text/typescript
import type { Channel } from 'stream-chat';
import { useChannelOwnCapabilities } from './useChannelOwnCapabilities';
/**
* Whether the current user can add members to the channel.
*/
export const useCanAddMembersToChannel = (channel?: Channel) =>
useChannelOwnCapabilities(channel)?.includes('update-channel-members') ?? false;