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

Query with subobject does not work

Open
#254 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

Hi,
I am trying to send push notifications via
`Push.send({
from: 'push',
title: 'Quote of the Day',
text: quote.quote + ' ' + quote.author,
//send where interval is 2 (daily)
query: {'profile.quotesInterval': 2}
});`
but it does not work. If I leave the query empty, everything works perfectly, and when using
`db.users.find({'profile.quotesInterval':2})`
MongoDB returns users, so in theory the query should work.

Is there another way to select something out of a subobject?

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 examining how Push.send handles the query object, then compare its nested-field behavior with the db.users.find example in the report. Reproduce the notification query using profile.quotesInterval; done means determining whether the nested query works or documenting the supported way to select users by that field.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.