tmolitor-stud-tu / mod_push_appserver

Simple and extendable appserver for XMPP pushes (aka. XEP-0357)
MIT License
25 stars 9 forks source link

purge invalid tokens #27

Closed anurodhp closed 4 years ago

anurodhp commented 4 years ago

when a server has been running for a long enough time (or people have upgraded their devices) there will be old invalid tokens registered to an account. These result in extra HTTPs calls and error for every message that arrives. e.g. Feb 19 01:34:14 ios13push.monal.im:push_appserver warn Push handler for type 'apns' not executed successfully: APNS error: Invalid token

When a apple server responds with invalid token the push server should purge it and reattempt it again and again.

tmolitor-stud-tu commented 4 years ago

Old nodes/tokens should be deregistered by when the apns feedback service is queried, but an error in mod_push_appserver prevented this deregister to happen.

I now also added code to directly deregister a node on token error.