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

code syntax for sending push to some userIDs

Open
#109 1 comment 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 an array filled with userIDs. how can I use the query parameter to send a push to all users?

wiki
query can be left empty in which case the notification will be sent to all devices that have registered a token. query can also be one or more ids obtained from clients via Push.id() or one or more userIds associated with the accounts-base package and Meteor.userId().

all users:
query: {}

single user:
query: {userId: "us3r1d5tr1n6"}

what is the syntax to send something like this:

some users:

var myarray : ['sadfsdfddfds2','asdfsdfffsdf3', 'oko34r23ijfsafdf', '123owksfoadkf'];?

query:{userIds: myarray}

is not working

I´m using myarray.forEach() and do a push for each userId but it looks like the wiki says it works also with a list of ids?

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 checking the wiki's documented query forms and the package behavior for an array of user IDs, then compare that with the reported query: {userIds: myarray} usage and the forEach() workaround. Done means the supported syntax or limitation is confirmed and the wiki or implementation accurately reflects it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.