mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Fix group recipient being created without a group record.
This commit is contained in:
@@ -1005,14 +1005,16 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
||||
val groupId = GroupId.v2(masterKey)
|
||||
val values = getValuesForStorageGroupV2(insert, true)
|
||||
|
||||
writableDatabase.insertOrThrow(TABLE_NAME, null, values)
|
||||
val createdId = writableDatabase.withinTransaction {
|
||||
writableDatabase.insertOrThrow(TABLE_NAME, null, values)
|
||||
|
||||
Log.i(TAG, "Creating restore placeholder for $groupId")
|
||||
val createdId = groups.create(
|
||||
groupMasterKey = masterKey,
|
||||
groupState = DecryptedGroup(revision = GroupsV2StateProcessor.RESTORE_PLACEHOLDER_REVISION),
|
||||
groupSendEndorsements = null
|
||||
)
|
||||
Log.i(TAG, "Creating restore placeholder for $groupId")
|
||||
groups.create(
|
||||
groupMasterKey = masterKey,
|
||||
groupState = DecryptedGroup(revision = GroupsV2StateProcessor.RESTORE_PLACEHOLDER_REVISION),
|
||||
groupSendEndorsements = null
|
||||
)
|
||||
}
|
||||
|
||||
if (createdId == null) {
|
||||
Log.w(TAG, "Unable to create restore placeholder for $groupId, group already exists")
|
||||
|
||||
Reference in New Issue
Block a user