mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-25 05:27:42 +00:00
Remove the unknown insert validation.
There's actually a legitimate case where this is ok: right after a backup restore. Restoring a backup means that you have possibly carried over some unknownIds, and if you don't remember your PIN, those items wouldn't be there remotely. And you _should_ insert them. Otherwise they're lost. I don't think this validation is worth the trouble of carving out lots of conditions to allow this usecase.
This commit is contained in:
@@ -137,10 +137,6 @@ public final class StorageSyncValidations {
|
||||
throw new InsertNotPresentInFullIdSetError();
|
||||
}
|
||||
|
||||
if (insert.isUnknown()) {
|
||||
throw new UnknownInsertError();
|
||||
}
|
||||
|
||||
if (insert.getContact().isPresent()) {
|
||||
SignalContactRecord contact = insert.getContact().get();
|
||||
|
||||
@@ -173,9 +169,6 @@ public final class StorageSyncValidations {
|
||||
private static final class DeletePresentInFullIdSetError extends Error {
|
||||
}
|
||||
|
||||
private static final class UnknownInsertError extends Error {
|
||||
}
|
||||
|
||||
private static final class MultipleAccountError extends Error {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user