From 3fdfda1960161e8b304b3979e1ff370acb145419 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Tue, 15 Mar 2022 15:25:14 +1100 Subject: [PATCH] Code consistency tweaks --- Session/Conversations/ConversationVC+Interaction.swift | 2 +- .../Home/Message Requests/MessageRequestsViewController.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Session/Conversations/ConversationVC+Interaction.swift b/Session/Conversations/ConversationVC+Interaction.swift index 4e5071515..89fc64fcd 100644 --- a/Session/Conversations/ConversationVC+Interaction.swift +++ b/Session/Conversations/ConversationVC+Interaction.swift @@ -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(()) } diff --git a/Session/Home/Message Requests/MessageRequestsViewController.swift b/Session/Home/Message Requests/MessageRequestsViewController.swift index 4ecc55ea1..62dcb634b 100644 --- a/Session/Home/Message Requests/MessageRequestsViewController.swift +++ b/Session/Home/Message Requests/MessageRequestsViewController.swift @@ -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