From 582ccc3894d9f6da8bb90ab2686a01e23a07fd99 Mon Sep 17 00:00:00 2001 From: Paul Ailincai Date: Sat, 9 Oct 2021 16:19:56 +0400 Subject: [PATCH] Migrated usage of _ensureIndex to createIndex and Firebase libraries updates --- lib/server/internalMethods.js | 2 +- lib/server/pushToDB.js | 10 +++++----- package.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/server/internalMethods.js b/lib/server/internalMethods.js index 7121650..9f863b5 100755 --- a/lib/server/internalMethods.js +++ b/lib/server/internalMethods.js @@ -5,7 +5,7 @@ import { Push } from './pushToDB' import { Meteor } from 'meteor/meteor' Push.appCollection = new Mongo.Collection('_push_app_tokens') -Push.appCollection._ensureIndex({ userId: 1 }) +Push.appCollection.createIndex({ userId: 1 }) const matchToken = Match.OneOf({ web: String }, { android: String }, { apn: String }, { ios: String }) diff --git a/lib/server/pushToDB.js b/lib/server/pushToDB.js index acfa94d..409e141 100755 --- a/lib/server/pushToDB.js +++ b/lib/server/pushToDB.js @@ -8,11 +8,11 @@ function EventState () {} const Push = new EventState() Push.notifications = new Mongo.Collection('_push_notifications') -Push.notifications._ensureIndex({ createdAt: 1 }) -Push.notifications._ensureIndex({ sent: 1 }) -Push.notifications._ensureIndex({ sending: 1 }) -Push.notifications._ensureIndex({ delayUntil: 1 }) -Push.notifications._ensureIndex({ userId: 1 }) +Push.notifications.createIndex({ createdAt: 1 }) +Push.notifications.createIndex({ sent: 1 }) +Push.notifications.createIndex({ sending: 1 }) +Push.notifications.createIndex({ delayUntil: 1 }) +Push.notifications.createIndex({ userId: 1 }) const validateDocument = notification => { const matchToken = Match.OneOf({ apn: String }, { android: String }, { web: String }) diff --git a/package.js b/package.js index 7c6f133..e642f88 100755 --- a/package.js +++ b/package.js @@ -1,14 +1,14 @@ /* globals Package, Npm, Cordova */ Package.describe({ name: 'activitree:push', - version: '2.0.10', + version: '2.0.11', summary: 'Push Notifications for Cordova and Web/PWA with Firebase (FCM).', git: 'https://github.com/activitree/meteor-push.git' }) Npm.depends({ - 'firebase-admin': '9.11.0', - firebase: '8.8.1', + 'firebase-admin': '9.12.0', + firebase: '9.1.2', events: '3.3.0' })