From 8a7a14a5bd314ef52a7f2a7755b8a44a5e0df519 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Tue, 11 Aug 2026 15:31:29 -0500 Subject: [PATCH] Allow missing custom color during backup export Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com> --- ts/services/backups/export.preload.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ts/services/backups/export.preload.ts b/ts/services/backups/export.preload.ts index 04ad123aa2..c4bc4447cb 100644 --- a/ts/services/backups/export.preload.ts +++ b/ts/services/backups/export.preload.ts @@ -3962,9 +3962,14 @@ export class BackupExportStream extends Readable { ); const index = this.#customColorIdByUuid.get(customColorId); - strictAssert(index != null, 'Missing custom color'); - - bubbleColor = { customColorId: index }; + if (index != null) { + bubbleColor = { customColorId: index }; + } else { + log.warn( + `toChatStyle: chat style referenced unknown custom color ${customColorId}` + ); + bubbleColor = { autoBubbleColor: {} }; + } } else { const { BubbleColorPreset } = Backups.ChatStyle;