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:
commit
6ef2d471e9
1 changed files with 4 additions and 0 deletions
|
@ -419,6 +419,10 @@ export class ImportNotesProcessorService {
|
||||||
const name = file.url.substring(slashdex + 1);
|
const name = file.url.substring(slashdex + 1);
|
||||||
const exists = await this.driveFilesRepository.findOneBy({ name: name, userId: user.id });
|
const exists = await this.driveFilesRepository.findOneBy({ name: name, userId: user.id });
|
||||||
if (exists) {
|
if (exists) {
|
||||||
|
if (file.name) {
|
||||||
|
this.driveService.updateFile(exists, { comment: file.name }, user);
|
||||||
|
}
|
||||||
|
|
||||||
files.push(exists);
|
files.push(exists);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue