Merge pull request #1687 from oxen-io/fix/ses-2802

SES-2802 - Deleted message re-appearing
This commit is contained in:
ThomasSession 2024-10-10 13:55:13 +11:00 committed by GitHub
commit a324cd3e1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1582,8 +1582,11 @@ open class Storage(
DatabaseComponent.get(context).recipientDatabase().setApproved(recipient, approved) DatabaseComponent.get(context).recipientDatabase().setApproved(recipient, approved)
if (recipient.isLocalNumber || !recipient.isContactRecipient) return if (recipient.isLocalNumber || !recipient.isContactRecipient) return
configFactory.contacts?.upsertContact(recipient.address.serialize()) { configFactory.contacts?.upsertContact(recipient.address.serialize()) {
// if the contact wasn't approved before but is approved now, make sure it's visible
if(approved && !this.approved) this.priority = PRIORITY_VISIBLE
// update approval
this.approved = approved this.approved = approved
this.priority = PRIORITY_VISIBLE
} }
} }