From cf5dc4b940b9cac13065adfe65ae5d138dc45e89 Mon Sep 17 00:00:00 2001 From: trevor-signal <131492920+trevor-signal@users.noreply.github.com> Date: Mon, 10 Feb 2025 17:09:12 -0500 Subject: [PATCH] Only show error toast when importing unknown frames --- ts/services/backups/import.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ts/services/backups/import.ts b/ts/services/backups/import.ts index 8db6df819..1ab2445b5 100644 --- a/ts/services/backups/import.ts +++ b/ts/services/backups/import.ts @@ -503,9 +503,19 @@ export class BackupImportStream extends Writable { await this.#fromStickerPack(frame.stickerPack); } else if (frame.adHocCall) { await this.#fromAdHocCall(frame.adHocCall); + } else if (frame.notificationProfile) { + log.warn( + `${this.#logId}: Received currently unsupported feature: notification profile. Dropping.` + ); + } else if (frame.chatFolder) { + log.warn( + `${this.#logId}: Received currently unsupported feature: chat folder. Dropping.` + ); } else { - log.warn(`${this.#logId}: unsupported frame item ${frame.item}`); - throw new Error('Unsupported frame type'); + log.warn( + `${this.#logId}: unknown unsupported frame item ${frame.item}` + ); + throw new Error('Unknown unsupported frame type'); } } catch (error) { this.#frameErrorCount += 1;