Code consistency tweaks

pull/592/head
Morgan Pretty 2 years ago
parent 63469acd3b
commit 3fdfda1960

@ -1171,7 +1171,7 @@ extension ConversationVC {
// (it'll be updated with correct profile info if they accept the message request so this
// shouldn't cause weird behaviours)
let sessionId: String = contactThread.contactSessionID()
let contact: Contact = (Storage.shared.getContact(with: sessionId) ?? Contact(sessionID: sessionId))
let contact: Contact = (Storage.shared.getContact(with: sessionId, using: transaction) ?? Contact(sessionID: sessionId))
guard !contact.isApproved else { return Promise.value(()) }

@ -313,7 +313,7 @@ class MessageRequestsViewController: BaseVC, UITableViewDelegate, UITableViewDat
// Update the contact
let sessionId: String = contactThread.contactSessionID()
if let contact: Contact = Storage.shared.getContact(with: sessionId), (contact.isApproved || !contact.isBlocked) {
if let contact: Contact = Storage.shared.getContact(with: sessionId, using: transaction), (contact.isApproved || !contact.isBlocked) {
contact.isApproved = false
contact.isBlocked = true

Loading…
Cancel
Save