mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-25 05:27:42 +00:00
Update to the latest backup.proto
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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) {
|
||||
|
||||
@@ -177,6 +177,9 @@ message Contact {
|
||||
IdentityState identityState = 15;
|
||||
Name nickname = 16; // absent iff both `given` and `family` are empty
|
||||
string note = 17;
|
||||
string systemGivenName = 18;
|
||||
string systemFamilyName = 19;
|
||||
string systemNickname = 20;
|
||||
}
|
||||
|
||||
message Group {
|
||||
|
||||
Reference in New Issue
Block a user