Skip to content

Commit

Permalink
Remove the unknown insert validation.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
greyson-signal committed Jan 4, 2023
1 parent bf491c2 commit 320669c
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ private static void validateManifestAndInserts(@NonNull SignalStorageManifest ma
throw new InsertNotPresentInFullIdSetError();
}

if (insert.isUnknown()) {
throw new UnknownInsertError();
}

if (insert.getContact().isPresent()) {
SignalContactRecord contact = insert.getContact().get();

Expand Down Expand Up @@ -173,9 +169,6 @@ private static final class InsertNotPresentInFullIdSetError extends Error {
private static final class DeletePresentInFullIdSetError extends Error {
}

private static final class UnknownInsertError extends Error {
}

private static final class MultipleAccountError extends Error {
}

Expand Down

0 comments on commit 320669c

Please sign in to comment.