Closed tostr7191 closed 2 years ago
I made this in quite a hurry and thought I'd add some more detail about it. Assume I have three tokens in my database:
ExponentPushToken[somethingvalid]
ExponentPushToken[somethinginvalid]
a_completely_wrong_string
If I try to send a PN to all three tokens, the valid token works ofc, the invalid token will get put into invalid_push_tokens
, but "a_completely_wrong_string" will not. This pull request changes that. The use-case is that I want to delete all non-working tokens from the database even if they are not formatted correctly.
Thanks @to-str
Right now only tokens that match
message.match(/ExponentPushToken\[(...*)\]/)
get added to invalid_push_tokens. I have made a change that adds other unregistered non-wokring tokens to the array as well, splitting the matching into invalid and unregistered, as per server return nomenclature.