[backend] Fix federation for incoming note edits with an attachment that has no alt text

This commit is contained in:
Laura Hausmann 2024-02-17 04:04:25 +01:00
parent 20ae0829a5
commit 31122636d3
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605

View File

@ -604,7 +604,7 @@ export async function updateNote(value: string | IObject, resolver?: Resolver) {
const file = await resolveImage(actor, x);
const update: Partial<DriveFile> = {};
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;
}