Add contact and key sync message receive support.

This commit is contained in:
Cody Henthorne
2022-01-18 11:10:23 -05:00
committed by Greyson Parrelli
parent c5028720e3
commit c548816daa
17 changed files with 542 additions and 143 deletions

View File

@@ -1524,6 +1524,15 @@ open class RecipientDatabase(context: Context, databaseHelper: SignalDatabase) :
}
}
fun setSystemContactName(id: RecipientId, systemContactName: String) {
val values = ContentValues().apply {
put(SYSTEM_JOINED_NAME, systemContactName)
}
if (update(id, values)) {
Recipient.live(id).refresh()
}
}
fun setProfileName(id: RecipientId, profileName: ProfileName) {
val contentValues = ContentValues(1).apply {
put(PROFILE_GIVEN_NAME, profileName.givenName)