mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-27 14:28:08 +09:00
[backend] Fix federation for incoming note edits with an attachment that has no alt text
This commit is contained in:
parent
20ae0829a5
commit
31122636d3
@ -604,7 +604,7 @@ export async function updateNote(value: string | IObject, resolver?: Resolver) {
|
|||||||
const file = await resolveImage(actor, x);
|
const file = await resolveImage(actor, x);
|
||||||
const update: Partial<DriveFile> = {};
|
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) {
|
if (file.comment !== altText) {
|
||||||
update.comment = altText;
|
update.comment = altText;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user