Closed seanieb closed 1 year ago
I know the iOS codebase best; here's what it does:
That is essentially "check every 12 hours" (the "shouldThrottle" flag is only used for debugging)…
…and "upload when the keys are 2/3 exhausted". There are a number of places that check gets called, not just app startup, in case the app stays resident in memory a long time, but the Signal chat server doesn't today send anything to the client to say you've run out of one-time pre-keys. It certainly could, however.
[edit: hm, not sure why those code snippet permalinks aren't rendering inline]
What are the current best practices around uploading new Prekeys? Should the client poll the server to check if their pre-keys are nearly exhausted, once a day/hourly, on app startup or after a certain number of sessions? Or should the client wait for a server notification that they need to publish.
This was discussed here with respect to libsignal but no solution is mentioned: https://github.com/signalapp/Signal-Desktop/issues/221
Thanks!