mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Merge pull request #572 from RyanRory/fix-closed-group-not-restored
Fix closed groups not restored
This commit is contained in:
commit
49c995ee92
|
@ -12,6 +12,8 @@ enum Onboarding {
|
|||
TSAccountManager.sharedInstance().phoneNumberAwaitingVerification = x25519PublicKey
|
||||
Storage.writeSync { transaction in
|
||||
let user = Contact(sessionID: x25519PublicKey)
|
||||
user.isApproved = true
|
||||
user.didApproveMe = 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 a new issue