Fix storage sync issues with usernames.

This commit is contained in:
Greyson Parrelli
2023-11-09 13:55:28 -05:00
parent 111c8367a9
commit 0acefb4521
6 changed files with 27 additions and 6 deletions

View File

@@ -206,9 +206,11 @@ object ContactDiscoveryRefreshV2 {
*/
@WorkerThread
private fun Set<RecipientId>.removePossiblyRegisteredButUnlisted(): Set<RecipientId> {
val selfId = Recipient.self().id
return this - Recipient.resolvedList(this)
.filter { it.hasServiceId() }
.filter { hasCommunicatedWith(it) }
.filter {
(it.hasServiceId() && hasCommunicatedWith(it)) || it.id == selfId
}
.map { it.id }
.toSet()
}