[SES-566] Fixed an issue where the blocked state wasn't syncing

This commit is contained in:
Morgan Pretty
2023-06-05 09:39:31 +10:00
parent 2b7bd7417e
commit 1980113e41
7 changed files with 47 additions and 11 deletions

View File

@@ -708,8 +708,10 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
recipientDatabase.setApproved(recipient, true)
threadDatabase.setHasSent(threadId, true)
}
if (contact.isBlocked == true) {
recipientDatabase.setBlocked(recipient, true)
val contactIsBlocked: Boolean? = contact.isBlocked
if (contactIsBlocked != null && recipient.isBlocked != contactIsBlocked) {
recipientDatabase.setBlocked(recipient, contactIsBlocked)
threadDatabase.deleteConversation(threadId)
}
}