use retry routine with force retry
This commit is contained in:
parent
a26c00e03a
commit
1ec1ec8b7c
1 changed files with 9 additions and 5 deletions
|
|
@ -202,11 +202,15 @@ const successfulHandshakeAlreadyExists = async recipientPub => {
|
||||||
* @returns {Promise<string|null>}
|
* @returns {Promise<string|null>}
|
||||||
*/
|
*/
|
||||||
const recipientToOutgoingID = async recipientPub => {
|
const recipientToOutgoingID = async recipientPub => {
|
||||||
const maybeEncryptedOutgoingID = await require('../../Mediator/index')
|
const maybeEncryptedOutgoingID = await tryAndWait(
|
||||||
.getUser()
|
(_, user) =>
|
||||||
.get(Key.RECIPIENT_TO_OUTGOING)
|
user
|
||||||
.get(recipientPub)
|
.get(Key.RECIPIENT_TO_OUTGOING)
|
||||||
.then()
|
.get(recipientPub)
|
||||||
|
.then(),
|
||||||
|
// force retry in case undefined is a false negative
|
||||||
|
v => typeof v === 'undefined'
|
||||||
|
)
|
||||||
|
|
||||||
if (typeof maybeEncryptedOutgoingID === 'string') {
|
if (typeof maybeEncryptedOutgoingID === 'string') {
|
||||||
const outgoingID = await require('../../Mediator/index').mySEA.decrypt(
|
const outgoingID = await require('../../Mediator/index').mySEA.decrypt(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue