mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 04:06:14 +00:00
Fix corner case in story distribution list syncing.
This commit is contained in:
@@ -85,6 +85,7 @@ import org.thoughtcrime.securesms.storage.StorageRecordUpdate
|
||||
import org.thoughtcrime.securesms.storage.StorageSyncHelper
|
||||
import org.thoughtcrime.securesms.storage.StorageSyncModels
|
||||
import org.thoughtcrime.securesms.util.Base64
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags
|
||||
import org.thoughtcrime.securesms.util.GroupUtil
|
||||
import org.thoughtcrime.securesms.util.IdentityUtil
|
||||
import org.thoughtcrime.securesms.util.ProfileUtil
|
||||
@@ -1093,7 +1094,7 @@ open class RecipientDatabase(context: Context, databaseHelper: SignalDatabase) :
|
||||
* @return All storage IDs for synced records, excluding the ones that need to be deleted.
|
||||
*/
|
||||
fun getContactStorageSyncIdsMap(): Map<RecipientId, StorageId> {
|
||||
val (inPart, args) = if (Recipient.self().storiesCapability == Recipient.Capability.SUPPORTED) {
|
||||
val (inPart, args) = if (FeatureFlags.stories() && Recipient.self().storiesCapability == Recipient.Capability.SUPPORTED) {
|
||||
"(?, ?)" to SqlUtil.buildArgs(GroupType.NONE.id, Recipient.self().id, GroupType.SIGNAL_V1.id, GroupType.DISTRIBUTION_LIST.id)
|
||||
} else {
|
||||
"(?)" to SqlUtil.buildArgs(GroupType.NONE.id, Recipient.self().id, GroupType.SIGNAL_V1.id)
|
||||
|
||||
@@ -448,8 +448,10 @@ public class StorageSyncJob extends BaseJob {
|
||||
if (record.getDistributionListId() != null) {
|
||||
records.add(StorageSyncModels.localToRemoteRecord(record));
|
||||
} else {
|
||||
throw new MissingRecipientModelError("Missing local recipient model! Type: " + id.getType());
|
||||
throw new MissingRecipientModelError("Missing local recipient model (no DistributionListId)! Type: " + id.getType());
|
||||
}
|
||||
} else {
|
||||
throw new MissingRecipientModelError("Missing local recipient model! Type: " + id.getType());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user