Skip to content

Commit

Permalink
Merge pull request #45029 from nextcloud/backport/44972/master
Browse files Browse the repository at this point in the history
fix(unifiedSearch): Prevent broken avatars for federated users
  • Loading branch information
susnux authored Apr 29, 2024
2 parents 2c059dd + ff49d19 commit 7bd35e0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion core/src/components/UnifiedSearch/SearchableList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
:wide="true"
@click="itemSelected(element)">
<template #icon>
<NcAvatar :user="element.user" :show-user-status="false" :hide-favorite="false" />
<NcAvatar v-if="element.isUser" :user="element.user" :show-user-status="false" />
<NcAvatar v-else
:is-no-user="true"
:display-name="element.displayName"
:show-user-status="false" />
</template>
{{ element.displayName }}
</NcButton>
Expand Down
1 change: 1 addition & 0 deletions core/src/views/UnifiedSearchModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ export default {
subname: contact.emailAddresses[0] ? contact.emailAddresses[0] : '',
icon: '',
user: contact.id,
isUser: contact.isUser,
}
})
},
Expand Down
4 changes: 2 additions & 2 deletions dist/core-unified-search.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-unified-search.js.map

Large diffs are not rendered by default.

0 comments on commit 7bd35e0

Please sign in to comment.