[backend] Fix federation for incoming note edits with an attachment that has no alt text
All checks were successful
/ test-build (push) Successful in 1m15s

This commit is contained in:
Laura Hausmann 2024-02-17 04:04:25 +01:00
parent 20ae0829a5
commit 31122636d3
Signed by: zotan
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;
}