mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 17:48:23 +00:00
Add FirebasePushManager#unregister
This commit is contained in:
@@ -36,6 +36,24 @@ data class SubscriptionRequest(
|
||||
val enc_key: String
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UnsubscriptionRequest(
|
||||
/** the 33-byte account being subscribed to; typically a session ID */
|
||||
val pubkey: String,
|
||||
/** when the pubkey starts with 05 (i.e. a session ID) this is the ed25519 32-byte pubkey associated with the session ID */
|
||||
val session_ed25519: String?,
|
||||
/** 32-byte swarm authentication subkey; omitted (or null) when not using subkey auth (new closed groups) */
|
||||
val subkey_tag: String? = null,
|
||||
/** the signature unix timestamp in seconds, not ms */
|
||||
val sig_ts: Long,
|
||||
/** the 64-byte ed25519 signature */
|
||||
val signature: String,
|
||||
/** the string identifying the notification service, "firebase" for android (currently) */
|
||||
val service: String,
|
||||
/** dict of service-specific data, currently just "token" field with device-specific token but different services might have other requirements */
|
||||
val service_info: Map<String, String>,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class SubscriptionResponse(
|
||||
val error: Int? = null,
|
||||
@@ -60,6 +78,14 @@ data class SubscriptionResponse(
|
||||
} else null to null
|
||||
}
|
||||
|
||||
@Serializable
|
||||
data class UnsubscribeResponse(
|
||||
val error: Int? = null,
|
||||
val message: String? = null,
|
||||
val success: Boolean? = null,
|
||||
val removed: Boolean? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class PushNotificationMetadata(
|
||||
/** Account ID (such as Session ID or closed group ID) where the message arrived **/
|
||||
|
@@ -318,7 +318,7 @@ interface TextSecurePreferences {
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun setFCMToken(context: Context, value: String) {
|
||||
fun setFCMToken(context: Context, value: String?) {
|
||||
setStringPreference(context, FCM_TOKEN, value)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user