Skip to content

Commit

Permalink
Also include external share results in recommendations
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Dec 28, 2020
1 parent 86e6f07 commit 50044f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/files_sharing/src/components/SharingInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ export default {
return
}

const externalResults = this.externalResults.filter(result => !result.condition || result.condition(this))

const exact = request.data.ocs.data.exact

// flatten array of arrays
Expand All @@ -302,6 +304,7 @@ export default {
// remove invalid data and format to user-select layout
this.recommendations = this.filterOutExistingShares(rawRecommendations)
.map(share => this.formatForMultiselect(share))
.concat(externalResults)

this.loading = false
console.info('recommendations', this.recommendations)
Expand Down

0 comments on commit 50044f0

Please sign in to comment.