Skip to content

Add token response interface #244

Open

Description

@mtrezza

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.

Activity

  1. parse-github-assistant commented on May 9, 2024

    @parse-github-assistant

    Thanks for opening this issue!

    • 🎉 We are excited about your ideas for improvement!
  2. mortenmo commented on May 12, 2024

    @mortenmo
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions