From 31122636d3f7f83e3ee7e63a96dd186af414d52e Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sat, 17 Feb 2024 04:04:25 +0100 Subject: [PATCH] [backend] Fix federation for incoming note edits with an attachment that has no alt text --- packages/backend/src/remote/activitypub/models/note.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/remote/activitypub/models/note.ts b/packages/backend/src/remote/activitypub/models/note.ts index 7fe1a15e1..ad88170fb 100644 --- a/packages/backend/src/remote/activitypub/models/note.ts +++ b/packages/backend/src/remote/activitypub/models/note.ts @@ -604,7 +604,7 @@ export async function updateNote(value: string | IObject, resolver?: Resolver) { const file = await resolveImage(actor, x); const update: Partial = {}; - const altText = truncate(x.name, DB_MAX_IMAGE_COMMENT_LENGTH); + const altText = truncate(x.name, DB_MAX_IMAGE_COMMENT_LENGTH) ?? null; if (file.comment !== altText) { update.comment = altText; }