summaryrefslogtreecommitdiff
path: root/packages/backend/src
diff options
context:
space:
mode:
authorMarie <marie@kaifa.ch>2024-02-19 01:27:08 +0000
committerMarie <marie@kaifa.ch>2024-02-19 01:27:08 +0000
commit6ef2d471e9dac992381041d0a2cd9a253ac87e57 (patch)
treea58894b1f621b0735b2d19168b53536b6655763b /packages/backend/src
parentmerge: rework boost visibility #388 (!420) (diff)
parentfix: keep alt text of file if present (diff)
downloadsharkey-6ef2d471e9dac992381041d0a2cd9a253ac87e57.tar.gz
sharkey-6ef2d471e9dac992381041d0a2cd9a253ac87e57.tar.bz2
sharkey-6ef2d471e9dac992381041d0a2cd9a253ac87e57.zip
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>
Diffstat (limited to 'packages/backend/src')
-rw-r--r--packages/backend/src/queue/processors/ImportNotesProcessorService.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/backend/src/queue/processors/ImportNotesProcessorService.ts b/packages/backend/src/queue/processors/ImportNotesProcessorService.ts
index b772578b33..f79ecb419a 100644
--- a/packages/backend/src/queue/processors/ImportNotesProcessorService.ts
+++ b/packages/backend/src/queue/processors/ImportNotesProcessorService.ts
@@ -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);
}
}