From 8c7b4aa40de84ec1ee88d9403c048bba350815a7 Mon Sep 17 00:00:00 2001
From: Bruno Muniz Azevedo Filho <bruno@elixxir.io>
Date: Mon, 27 Jun 2022 15:47:26 -0300
Subject: [PATCH] Fixed bugs found by qa

---
 Sources/Integration/Session/Session+Contacts.swift | 2 +-
 Sources/Integration/Session/Session.swift          | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Sources/Integration/Session/Session+Contacts.swift b/Sources/Integration/Session/Session+Contacts.swift
index 4994cc2d..fa27fe2e 100644
--- a/Sources/Integration/Session/Session+Contacts.swift
+++ b/Sources/Integration/Session/Session+Contacts.swift
@@ -124,7 +124,7 @@ extension Session {
 
         var contactToOperate: Contact!
 
-        if contact.authStatus == .requestFailed || contact.authStatus == .confirmationFailed {
+        if [.requestFailed, .confirmationFailed, .stranger].contains(contact.authStatus) {
             contactToOperate = contact
         } else {
             if let _ = try? dbManager.fetchContacts(.init(id: [contact.id])).first {
diff --git a/Sources/Integration/Session/Session.swift b/Sources/Integration/Session/Session.swift
index 2899e402..44e3d1b7 100644
--- a/Sources/Integration/Session/Session.swift
+++ b/Sources/Integration/Session/Session.swift
@@ -195,6 +195,8 @@ public final class Session: SessionType {
 
         let query = Contact.Query(authStatus: [.verificationInProgress])
         _ = try? dbManager.bulkUpdateContacts(query, .init(authStatus: .verificationFailed))
+
+        scanStrangers {}
     }
 
     public func setDummyTraffic(status: Bool) {
-- 
GitLab