UNPKG

stream-chat-react-native-core

Version:

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

21 lines 1.08 kB
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.selectActiveLocationsForChannels = void 0; var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); var _SqliteClient = require("../../SqliteClient"); var selectActiveLocationsForChannels = exports.selectActiveLocationsForChannels = function () { var _ref = (0, _asyncToGenerator2.default)(function* (cids) { var questionMarks = Array(cids.length).fill('?').join(','); _SqliteClient.SqliteClient.logger?.('info', 'selectActiveLocationsForChannels', { cids }); var locations = yield _SqliteClient.SqliteClient.executeSql(`SELECT * FROM locations WHERE channelCid IN (${questionMarks}) AND endAt IS NOT NULL AND endAt > ?`, [...cids, new Date().toISOString()]); return locations; }); return function selectActiveLocationsForChannels(_x) { return _ref.apply(this, arguments); }; }(); //# sourceMappingURL=selectActiveLocationsForChannels.js.map