merge: fix: keep alt text of file if present (!418)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/418

Approved-by: Amelia Yukii <amelia.yukii@shourai.de>
Approved-by: dakkar <dakkar@thenautilus.net>
This commit is contained in:
Marie 2024-02-19 01:27:08 +00:00
commit 6ef2d471e9
1 changed files with 4 additions and 0 deletions

View File

@ -419,6 +419,10 @@ export class ImportNotesProcessorService {
const name = file.url.substring(slashdex + 1);
const exists = await this.driveFilesRepository.findOneBy({ name: name, userId: user.id });
if (exists) {
if (file.name) {
this.driveService.updateFile(exists, { comment: file.name }, user);
}
files.push(exists);
}
}