Fix another syncing crash when no archived media exists.

This commit is contained in:
Greyson Parrelli
2025-04-11 16:53:50 -04:00
committed by Cody Henthorne
parent 6525662071
commit 8e880fe117

View File

@@ -156,6 +156,10 @@ class BackupMediaSnapshotTable(context: Context, database: SignalDatabase) : Dat
* Given a list of media objects, find the ones that we have no knowledge of in our local store.
*/
fun getMediaObjectsWithNonMatchingCdn(objects: List<ArchivedMediaObject>): List<CdnMismatchResult> {
if (objects.isEmpty()) {
return emptyList()
}
val inputValues = objects.joinToString(separator = ", ") { "('${it.mediaId}', ${it.cdn})" }
return readableDatabase.rawQuery(
"""