UNPKG

stream-chat-react-native-core

Version:

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

22 lines 884 B
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.channelExists = void 0; var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); var _SqliteClient = require("../SqliteClient"); var channelExists = exports.channelExists = function () { var _ref = (0, _asyncToGenerator2.default)(function* ({ cid }) { var channels = yield _SqliteClient.SqliteClient.executeSql('SELECT EXISTS(SELECT 1 FROM channels WHERE cid = ?)', [cid]); _SqliteClient.SqliteClient.logger == null || _SqliteClient.SqliteClient.logger('info', 'channelExists', { cid }); return channels.length > 0; }); return function channelExists(_x) { return _ref.apply(this, arguments); }; }(); //# sourceMappingURL=channelExists.js.map