From 8f6dfa611ef6f5fd6fa68bb5108573f7cb9e34b4 Mon Sep 17 00:00:00 2001
From: Marie <marie@kaifa.ch>
Date: Tue, 13 Feb 2024 22:01:53 +0000
Subject: [PATCH] fix: keep alt text of file if present

---
 .../src/queue/processors/ImportNotesProcessorService.ts       | 4 ++++
 1 file changed, 4 insertions(+)

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);
 				}
 			}
-- 
GitLab