mark current user as approved in message request migration
This commit is contained in:
parent
9a04c7a4fe
commit
b1fb202eab
|
@ -14,7 +14,6 @@ enum Onboarding {
|
|||
let user = Contact(sessionID: x25519PublicKey)
|
||||
user.isApproved = true
|
||||
user.didApproveMe = true
|
||||
user.isTrusted = true
|
||||
Storage.shared.setContact(user, using: transaction)
|
||||
}
|
||||
switch self {
|
||||
|
|
|
@ -41,6 +41,13 @@ public class MessageRequestsMigration : OWSDatabaseMigration {
|
|||
threads.append(thread)
|
||||
}
|
||||
|
||||
if let user = Storage.shared.getUser() {
|
||||
user.isApproved = true
|
||||
user.didApproveMe = true
|
||||
contacts.insert(user)
|
||||
}
|
||||
|
||||
|
||||
Storage.write(with: { transaction in
|
||||
contacts.forEach { contact in
|
||||
Storage.shared.setContact(contact, using: transaction)
|
||||
|
|
Loading…
Reference in New Issue