UNPKG

stream-chat-react-native-core

Version:

The official React Native and Expo components for Stream Chat, a service for building chat applications

15 lines (11 loc) 342 B
import { SqliteClient } from '../SqliteClient'; export const channelExists = async ({ cid }: { cid: string }) => { const channels = await SqliteClient.executeSql( 'SELECT EXISTS(SELECT 1 FROM channels WHERE cid = ?)', [cid], ); SqliteClient.logger?.('info', 'channelExists', { cid, }); return channels.length > 0; };