Skip to content

Dedupe sending notification token to server #322

@gnprice

Description

@gnprice

In my initial implementation of #122, I plan to have the app just tell the server its notification token again and again on each launch.

As a follow-up, we should have it instead remember when it's already successfully told the server its token, and then not tell it again. We do this in zulip-mobile.

Actually, there's a refinement to make. Google's docs recommend that the client should repeat itself to the server, but only after a month:
https://firebase.google.com/docs/cloud-messaging/manage-tokens#ensuring-registration-token-freshness
That then allows the server to conclude when a token hasn't been re-registered in, say, two months, that it's stale — that the client has gone away — and Google recommends that the server stop sending notifications to it in that case. (I don't recall seeing that recommendation the last time I studied these docs, several years ago. Not sure if Apple also recommends something similar these days.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions