Meteor-Community-Packages / Meteor-Community-Packages/raix-push

Query does not work nor the auto-login

Open
#141 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
505
Forks
191
PR merge metrics
No merged PRs in 30d

Description

I have accounts-base package already installed,
good thing is when i leave the query as blank or an empty object i received push notifications,

```
Meteor.call('serverNotification', 'a', 'b'); // query: {}
```

but the irritating part is that when i logged in, its supposed to save the user_id to the current token right?
checking the _raix_push_app_tokens collections the userId is still null,
neither the listeners, not firing at all so i cant actually force save the token to current logged in user.

```
Meteor.startup(function(){
if (Meteor.isCordova) {
Push.addListener('token', function(token) {
console.log('Token: ' + JSON.stringify(token));
Session.set("pushtoken", token);
});

Push.addListener('message', function(notification) {
// Called on every message
console.log('PUSH LISTERNER: ', JSON.stringify(notification));
});

Push.addListener('startup', function(notification) {
console.log('PUSH STARTING UP!!!!');
});
}
});
```

all of that are not even firing, not even once,
please do tell me where did i get it wrong?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the blank and populated query calls around Meteor.call('serverNotification', ...) and the Meteor.startup Push listeners shown in the issue. Inspect the _raix_push_app_tokens collection while testing login and token events. Done means the query works, the token receives the logged-in userId, and the documented listeners fire.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.