From b1a44b4d72cd0e02c32a8fae75d248e1c65383c5 Mon Sep 17 00:00:00 2001
From: skjnldsv <skjnldsv@protonmail.com>
Date: Tue, 29 Apr 2025 16:42:09 +0200
Subject: fix(dav): check the owner displayName scope before giving attribute

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
---
 apps/files_sharing/src/views/FilesHeaderNoteToRecipient.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'apps/files_sharing/src/views/FilesHeaderNoteToRecipient.vue')

diff --git a/apps/files_sharing/src/views/FilesHeaderNoteToRecipient.vue b/apps/files_sharing/src/views/FilesHeaderNoteToRecipient.vue
index 31b66741698..ec6348606fb 100644
--- a/apps/files_sharing/src/views/FilesHeaderNoteToRecipient.vue
+++ b/apps/files_sharing/src/views/FilesHeaderNoteToRecipient.vue
@@ -6,7 +6,7 @@
 	<NcNoteCard v-if="note.length > 0"
 		class="note-to-recipient"
 		type="info">
-		<p v-if="user" class="note-to-recipient__heading">
+		<p v-if="displayName" class="note-to-recipient__heading">
 			{{ t('files_sharing', 'Note from') }}
 			<NcUserBubble :user="user.id" :display-name="user.displayName" />
 		</p>
@@ -28,13 +28,13 @@ import NcUserBubble from '@nextcloud/vue/components/NcUserBubble'
 
 const folder = ref<Folder>()
 const note = computed<string>(() => folder.value?.attributes.note ?? '')
+const displayName = computed<string>(() => folder.value?.attributes['owner-display-name'] ?? '')
 const user = computed(() => {
 	const id = folder.value?.owner
-	const displayName = folder.value?.attributes?.['owner-display-name']
 	if (id !== getCurrentUser()?.uid) {
 		return {
 			id,
-			displayName,
+			displayName: displayName.value,
 		}
 	}
 	return null
-- 
cgit v1.2.3

