mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Fix approval not saved to user config
This commit is contained in:
parent
7832f13562
commit
b92c4065cc
@ -1491,14 +1491,8 @@ open class Storage(
|
|||||||
val address = recipient.address.serialize()
|
val address = recipient.address.serialize()
|
||||||
val blindedId = when {
|
val blindedId = when {
|
||||||
recipient.isGroupRecipient -> null
|
recipient.isGroupRecipient -> null
|
||||||
recipient.isOpenGroupInboxRecipient -> {
|
recipient.isOpenGroupInboxRecipient -> GroupUtil.getDecodedOpenGroupInboxSessionId(address)
|
||||||
GroupUtil.getDecodedOpenGroupInboxSessionId(address)
|
else -> address.takeIf { SessionId(it).prefix == IdPrefix.BLINDED }
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
if (SessionId(address).prefix == IdPrefix.BLINDED) {
|
|
||||||
address
|
|
||||||
} else null
|
|
||||||
}
|
|
||||||
} ?: continue
|
} ?: continue
|
||||||
mappingDb.getBlindedIdMapping(blindedId).firstOrNull()?.let {
|
mappingDb.getBlindedIdMapping(blindedId).firstOrNull()?.let {
|
||||||
mappings[address] = it
|
mappings[address] = it
|
||||||
@ -1516,8 +1510,8 @@ open class Storage(
|
|||||||
smsDb.updateThreadId(blindedThreadId, threadId)
|
smsDb.updateThreadId(blindedThreadId, threadId)
|
||||||
threadDB.deleteConversation(blindedThreadId)
|
threadDB.deleteConversation(blindedThreadId)
|
||||||
}
|
}
|
||||||
recipientDb.setApproved(sender, true)
|
setRecipientApproved(sender, true)
|
||||||
recipientDb.setApprovedMe(sender, true)
|
setRecipientApprovedMe(sender, true)
|
||||||
val message = IncomingMediaMessage(
|
val message = IncomingMediaMessage(
|
||||||
sender.address,
|
sender.address,
|
||||||
response.sentTimestamp!!,
|
response.sentTimestamp!!,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user