Meteor-Community-Packages / raix-push

DEPRECATED: Push notifications for cordova (ios, android) browser (Chrome, Safari, Firefox)
https://atmospherejs.com/raix/push
MIT License
515 stars 197 forks source link

Meteor - Error: allow: Invaild key: send #197

Closed Wade-BuildOtto closed 8 years ago

Wade-BuildOtto commented 8 years ago

_Error: allow: Invalid key: send at packages/mongo/collection.js:746:1 at Array.forEach (packages/es5-shim/.npm/package/nodemodules/es5-shim/es5-shim.js:417:1) at Function..each..forEach (packages/underscore/underscore.js:105:1) at [object Object].addValidator (packages/mongo/collection.js:744:1) at [object Object].Mongo.Collection.allow (packages/mongo/collection.js:792:1) at server/pushMethods.js:6:8 at ...meteor/local/build/programs/server/app/server/pushMethods.js:62:4 at ...meteor/local/build/programs/server/boot.js:242:10 at Array.forEach (native) at Function..each._.forEach (/Users/wadesmith/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/nodemodules/underscore/underscore.js:79:11)

It's like it doesn't understand the security rule send in the allow.

Following the newbie manual, I added the Config.push.json in the root with as apn-dev

under Server/pushMethod.js

Meteor.startup(function () { Push.debug=true; });

Push.allow( send: function(userId, notification) { return true; }// Allow all users to send });

Meteor.methods({ serverNotification: function(text,title) { var badge = 1 Push.send({ ...

Wade-BuildOtto commented 8 years ago

In the Config.push.json I removed the private folder which then once it registered it picked up on the send rule and resolved the issue.