Open shurwit opened 1 year ago
Hi @martin-rokmetro, you can find the function call that sends the notification to a specific token that may return the error mentioned above here: https://github.com/rokwire/notifications-building-block/blob/5ca50b79072fc10a83120f5c447a7c7581550858/core/app_queue.go#L254
Is your feature request related to a problem? Please describe. Currently we accumulate FCM tokens indefinitely which leads to significant unnecessary overhead when notifications are sent.
Describe the solution you'd like We should remove tokens that are no longer valid to reduce the clutter. It looks like we may receive a specific error message from Firebase when we attempt to send to an invalid token:
There may be other cases in which we want to remove these tokens as well but we will need to be careful not to remove them based on errors that are due to a temporary state.