Skip to content

Commit d2151a4

Browse files
committed
Not removing non standard recipients
1 parent 2d687d6 commit d2151a4

File tree

1 file changed

+1
-0
lines changed
  • app/src/main/java/org/thoughtcrime/securesms/database

1 file changed

+1
-0
lines changed

app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,7 @@ open class Storage @Inject constructor(
12631263
// which in the case of contacts we are messaging for the first time and who haven't yet approved us, it won't be the case
12641264
// But that person is saved in the Recipient db. We might need to investigate how to clean the relationship between Recipients, Contacts and config Contacts.
12651265
val removedContacts = recipientDatabase.allRecipients.filter { localContact ->
1266+
AccountId(localContact.address.toString()).prefix == IdPrefix.STANDARD && // only want standard address
12661267
localContact.is1on1 && // only for conversations
12671268
localContact.address.toString() != currentUserKey && // we don't want to remove ourselves (ie, our Note to Self)
12681269
moreContacts.none { it.id == localContact.address.toString() } // we don't want to remove contacts that are present in the config

0 commit comments

Comments
 (0)