diff --git a/src/org/thoughtcrime/securesms/database/helpers/SQLCipherMigrationHelper.java b/src/org/thoughtcrime/securesms/database/helpers/SQLCipherMigrationHelper.java index b1a58efedd..7d40bc53ac 100644 --- a/src/org/thoughtcrime/securesms/database/helpers/SQLCipherMigrationHelper.java +++ b/src/org/thoughtcrime/securesms/database/helpers/SQLCipherMigrationHelper.java @@ -135,9 +135,11 @@ public class SQLCipherMigrationHelper { }); copyTable("thread", legacyDb, modernDb, (row, progress) -> { + Long snippetType = row.getAsLong("snippet_type"); + if (snippetType == null) snippetType = 0L; + Pair plaintext = getPlaintextBody(legacyCipher, legacyAsymmetricCipher, - row.getAsLong("snippet_type"), - row.getAsString("snippet")); + snippetType, row.getAsString("snippet")); row.put("snippet", plaintext.second); row.put("snippet_type", plaintext.first);