ably / ably-java

Java, Android, Clojure and Scala client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
85 stars 39 forks source link

Push registration token refresh forces default ClientOptions #562

Open tcard opened 4 years ago

tcard commented 4 years ago

Originally, you had to pass a AblyRest instance when refreshing registration tokens, but now, the AblyRest is instanced by us, using the deviceIdentityToken as key, with default options. So, if the client relies on non-default options (custom fallbacks, custom push registration), token refresh won't work.

┆Issue is synchronized with this Jira Task by Unito

tcard commented 4 years ago

@paddybyers WDYT?

paddybyers commented 4 years ago

I agree this is a problem - I thought I'd already raised an issue for it somewhere.

Edit: I can't find it. The environment definitely needs to be persisted as part of the persisted LocalDevice details, together with anything else that is going to be needed if there's going to be a registration token update authenticated by deviceIdentityToken.