Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add token response interface #244

Open
3 tasks done
mtrezza opened this issue May 9, 2024 · 2 comments
Open
3 tasks done

Add token response interface #244

mtrezza opened this issue May 9, 2024 · 2 comments

Comments

@mtrezza
Copy link
Member

mtrezza commented May 9, 2024

New Feature / Enhancement Checklist

Current Limitation

Parse Server has the capability to remove invalid device push tokens from the _Installation class. The logic that parses the errors is in Parse Server and is applied to the push token response that is sent from the push adapter to Parse Server. That logic probably should be in the push adapter, since these errors are push API specific.

Feature / Enhancement Description

An interface that returns an array of "tokens to remove", "tokens with successful push", etc, to decouple the push adapter more from Parse Server.

Copy link

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

@mortenmo
Copy link
Contributor

Like this idea, especially since Apple in particular can start to block you if you keep sending to bad devices.

if I could suggest a maybe(?) simpler solution is to just add a new property to the result object so that if result.transmitted === false StatusHandler just looks for result.deviceShouldBeRemoved === true. If that is set, remove the token similar to current error parsing logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants