-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Utilise new Push Notification endpoint for 1-on-1 conversations. #1249
Conversation
…endency for only the play version of the app. Add support for requests in new pn server
…f assuming utf-8 encoding for strings
Finishes the WIP for subscribing to push notifications and handling the new-style pushes we get.
import android.content.Context | ||
import org.session.libsession.utilities.TextSecurePreferences | ||
|
||
class FcmTokenManager( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to rename this PushTokenManager
or something in case we want to support multiple generic push token implementations, even though all the preferences stuff are using FCM
wording 🤔
fun unregister( | ||
token: String, | ||
userPublicKey: String, | ||
userEdKey: KeyPair |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if the API needs namespaces in the unsubscribe signature data, but if we pass even an empty list as default here we will probably avoid issues in the future if we ever call register
with specific namespaces above
|
||
enum class Server(val url: String, val publicKey: String) { | ||
LATEST("https://push.getsession.org", "d7557fe563e2610de876c0ac7341b62f3c82d5eea4b62c702392ea4368f51b3b"), | ||
LEGACY("https://dev.apns.getsession.org", "642a6585919742e5a2d4dc51244964fbcd8bcab2b75612407de58b810740d049") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this one still be dev or we are just testing it for now?
No description provided.