mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-26 01:27:20 +00:00
Correctly reset prekeys for linking.
This commit is contained in:
parent
94a9303d7a
commit
bb0ac32540
@ -36,6 +36,11 @@ class LokiPreKeyBundleDatabase(context: Context, helper: SQLCipherOpenHelper) :
|
|||||||
"$signedPreKeySignature TEXT," + "$identityKey TEXT NOT NULL," + "$deviceID INTEGER," + "$registrationID INTEGER" + ");"
|
"$signedPreKeySignature TEXT," + "$identityKey TEXT NOT NULL," + "$deviceID INTEGER," + "$registrationID INTEGER" + ");"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun resetAllPreKeyBundleInfo() {
|
||||||
|
TextSecurePreferences.removeLocalRegistrationId(context)
|
||||||
|
TextSecurePreferences.setSignedPreKeyRegistered(context, false)
|
||||||
|
}
|
||||||
|
|
||||||
fun generatePreKeyBundle(hexEncodedPublicKey: String): PreKeyBundle? {
|
fun generatePreKeyBundle(hexEncodedPublicKey: String): PreKeyBundle? {
|
||||||
var registrationID = TextSecurePreferences.getLocalRegistrationId(context)
|
var registrationID = TextSecurePreferences.getLocalRegistrationId(context)
|
||||||
if (registrationID == 0) {
|
if (registrationID == 0) {
|
||||||
|
@ -227,7 +227,7 @@ class SeedActivity : BaseActionBarActivity(), DeviceLinkingDialogDelegate {
|
|||||||
|
|
||||||
private fun resetForRegistration() {
|
private fun resetForRegistration() {
|
||||||
IdentityKeyUtil.delete(this, IdentityKeyUtil.lokiSeedKey)
|
IdentityKeyUtil.delete(this, IdentityKeyUtil.lokiSeedKey)
|
||||||
TextSecurePreferences.removeLocalRegistrationId(this)
|
DatabaseFactory.getLokiPreKeyBundleDatabase(this).resetAllPreKeyBundleInfo()
|
||||||
TextSecurePreferences.removeLocalNumber(this)
|
TextSecurePreferences.removeLocalNumber(this)
|
||||||
TextSecurePreferences.setHasSeenWelcomeScreen(this, false)
|
TextSecurePreferences.setHasSeenWelcomeScreen(this, false)
|
||||||
TextSecurePreferences.setPromptedPushRegistration(this, false)
|
TextSecurePreferences.setPromptedPushRegistration(this, false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user