parse-community / parse-community/parse-server

Add Parse Endpoint that "sends all scheduled pushes"

Open
#6,066 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

I have no idea how to cleanly send all of my scheduled push notifications ensuring:

  1. the status of that push object is updated appropriately after sending and we don't just create a duplicate _PushStatus object
  2. we respect the scheduling rules baked into the _PushStatus object (we don't send too early or skip pushes that should be sent)

I'm hours into researching how to use parse to send "scheduled Push notifications" and this is what I know.

  • Parse will never embed a scheduler into the project
  • Parse has an optional flag that allows for the "scheduling" of push notifications
  • The flag allows for the creation of the "scheduled" push which under the hood makes a "_PushStatus" object with the "status" set to "scheduled"

Describe the solution you'd like
I would like to add a master key protected endpoint, like "/parse/push/sendScheduledPushes" or "/parse/push/sweep", that triggers the sending of all "scheduled Pushes" respecting the scheduling rules so that the scheduler of my choice can just trigger this endpoint on an interval of my choice without having to write a cloud function that requires knowing about all of the details of _PushStatus.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Option B: Would work for me but not for the community
Build out a cloud function that Queries _PushStatus and sends qualifying pushes BUT Since the "scheduling" of pushes is baked into Parse Server I feel like the community would have to dig too deep into the code to understand the details of _PushStatus. whereas it would be simple to trigger the sending of those pushes with just a POST to the proposed Parse Server endpoint.

Additional context
Add any other context or screenshots about the feature request here.

I'm happy to open a PR if this is something that would be considered, I would just need some help with understanding the rules of scheduling _PushStatus.

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

No files or tests are named. Start by tracing how scheduled Push notifications create and update _PushStatus objects, then compare that flow with the proposed master-key-protected /parse/push/sendScheduledPushes or /parse/push/sweep endpoint. Done means the endpoint sends every qualifying scheduled push without sending too early, skipping due pushes, or creating duplicate _PushStatus objects.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.