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) • 317 B
text/typescript
import type { Channel } from 'stream-chat';
import { useChannelOwnCapabilities } from './useChannelOwnCapabilities';
/**
* Whether the current user can update (edit) the channel.
*/
export const useCanEditChannel = (channel?: Channel) =>
useChannelOwnCapabilities(channel)?.includes('update-channel') ?? false;