mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-26 22:10:45 +00:00
Debug
This commit is contained in:
parent
b9dd42beb1
commit
bcc219bd1f
@ -1773,7 +1773,7 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
|
|||||||
*/
|
*/
|
||||||
private Recipient getMasterRecipient(String hexEncodedPublicKey) {
|
private Recipient getMasterRecipient(String hexEncodedPublicKey) {
|
||||||
try {
|
try {
|
||||||
String masterHexEncodedPublicKey = LokiDeviceLinkUtilities.INSTANCE.getMasterHexEncodedPublicKey(hexEncodedPublicKey).get();
|
String masterHexEncodedPublicKey = PromiseUtil.timeout(LokiDeviceLinkUtilities.INSTANCE.getMasterHexEncodedPublicKey(hexEncodedPublicKey), 5000).get();
|
||||||
String targetHexEncodedPublicKey = (masterHexEncodedPublicKey != null) ? masterHexEncodedPublicKey : hexEncodedPublicKey;
|
String targetHexEncodedPublicKey = (masterHexEncodedPublicKey != null) ? masterHexEncodedPublicKey : hexEncodedPublicKey;
|
||||||
// If the public key matches our master device then we need to forward the message to ourselves (note to self)
|
// If the public key matches our master device then we need to forward the message to ourselves (note to self)
|
||||||
String ourMasterHexEncodedPublicKey = TextSecurePreferences.getMasterHexEncodedPublicKey(context);
|
String ourMasterHexEncodedPublicKey = TextSecurePreferences.getMasterHexEncodedPublicKey(context);
|
||||||
|
@ -153,14 +153,14 @@ class LinkedDevicesActivity : PassphraseRequiredActionBarActivity, LoaderManager
|
|||||||
Timer().schedule(4000) {
|
Timer().schedule(4000) {
|
||||||
MessageSender.syncAllContacts(this@LinkedDevicesActivity, Address.fromSerialized(deviceLink.slaveHexEncodedPublicKey))
|
MessageSender.syncAllContacts(this@LinkedDevicesActivity, Address.fromSerialized(deviceLink.slaveHexEncodedPublicKey))
|
||||||
}
|
}
|
||||||
}.fail { exception ->
|
}.fail {
|
||||||
LokiFileServerAPI.shared.removeDeviceLink(deviceLink) // If this fails we have a problem
|
LokiFileServerAPI.shared.removeDeviceLink(deviceLink) // If this fails we have a problem
|
||||||
DatabaseFactory.getLokiPreKeyBundleDatabase(this).removePreKeyBundle(deviceLink.slaveHexEncodedPublicKey)
|
DatabaseFactory.getLokiPreKeyBundleDatabase(this).removePreKeyBundle(deviceLink.slaveHexEncodedPublicKey)
|
||||||
Util.runOnMain {
|
Util.runOnMain {
|
||||||
Toast.makeText(this, "Couldn't link device", Toast.LENGTH_LONG).show()
|
Toast.makeText(this, "Couldn't link device", Toast.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.failUi { exception ->
|
}.failUi {
|
||||||
DatabaseFactory.getLokiPreKeyBundleDatabase(this).removePreKeyBundle(deviceLink.slaveHexEncodedPublicKey)
|
DatabaseFactory.getLokiPreKeyBundleDatabase(this).removePreKeyBundle(deviceLink.slaveHexEncodedPublicKey)
|
||||||
Toast.makeText(this, "Couldn't link device", Toast.LENGTH_LONG).show()
|
Toast.makeText(this, "Couldn't link device", Toast.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user