Meteor-Community-Packages / Meteor-Community-Packages/raix-push
Query with subobject does not work
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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