mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-27 05:03:28 +00:00
Update to the latest backup.proto
This commit is contained in:
@@ -46,6 +46,9 @@ fun RecipientTable.getContactsForBackup(selfId: Long): ContactArchiveExporter {
|
||||
"${RecipientTable.TABLE_NAME}.${RecipientTable.PROFILE_GIVEN_NAME}",
|
||||
"${RecipientTable.TABLE_NAME}.${RecipientTable.PROFILE_FAMILY_NAME}",
|
||||
"${RecipientTable.TABLE_NAME}.${RecipientTable.PROFILE_JOINED_NAME}",
|
||||
"${RecipientTable.TABLE_NAME}.${RecipientTable.SYSTEM_GIVEN_NAME}",
|
||||
"${RecipientTable.TABLE_NAME}.${RecipientTable.SYSTEM_FAMILY_NAME}",
|
||||
"${RecipientTable.TABLE_NAME}.${RecipientTable.SYSTEM_NICKNAME}",
|
||||
"${RecipientTable.TABLE_NAME}.${RecipientTable.NICKNAME_GIVEN_NAME}",
|
||||
"${RecipientTable.TABLE_NAME}.${RecipientTable.NICKNAME_FAMILY_NAME}",
|
||||
"${RecipientTable.TABLE_NAME}.${RecipientTable.NOTE}",
|
||||
|
||||
@@ -78,6 +78,9 @@ class ContactArchiveExporter(private val cursor: Cursor, private val selfId: Lon
|
||||
.identityState(cursor.optionalInt(IdentityTable.VERIFIED).map { IdentityTable.VerifiedStatus.forState(it) }.orElse(IdentityTable.VerifiedStatus.DEFAULT).toRemote())
|
||||
.note(cursor.requireString(RecipientTable.NOTE) ?: "")
|
||||
.nickname(cursor.readNickname())
|
||||
.systemGivenName(cursor.requireString(RecipientTable.SYSTEM_GIVEN_NAME) ?: "")
|
||||
.systemFamilyName(cursor.requireString(RecipientTable.SYSTEM_FAMILY_NAME) ?: "")
|
||||
.systemNickname(cursor.requireString(RecipientTable.SYSTEM_NICKNAME) ?: "")
|
||||
|
||||
val registeredState = RecipientTable.RegisteredState.fromId(cursor.requireInt(RecipientTable.REGISTERED))
|
||||
if (registeredState == RecipientTable.RegisteredState.REGISTERED) {
|
||||
|
||||
@@ -52,7 +52,10 @@ object ContactArchiveImporter {
|
||||
RecipientTable.EXTRAS to contact.toLocalExtras().encode(),
|
||||
RecipientTable.NOTE to contact.note,
|
||||
RecipientTable.NICKNAME_GIVEN_NAME to contact.nickname?.given,
|
||||
RecipientTable.NICKNAME_FAMILY_NAME to contact.nickname?.family
|
||||
RecipientTable.NICKNAME_FAMILY_NAME to contact.nickname?.family,
|
||||
RecipientTable.SYSTEM_GIVEN_NAME to contact.systemGivenName,
|
||||
RecipientTable.SYSTEM_FAMILY_NAME to contact.systemFamilyName,
|
||||
RecipientTable.SYSTEM_NICKNAME to contact.systemNickname
|
||||
)
|
||||
|
||||
if (contact.registered != null) {
|
||||
|
||||
Reference in New Issue
Block a user