From 50044f053c609ac688b2e7d5ced3dfcd0f7a2cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 28 Dec 2020 17:15:15 +0100 Subject: [PATCH] Also include external share results in recommendations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_sharing/src/components/SharingInput.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue index 4222a5589e6fc..9fa9e47e287af 100644 --- a/apps/files_sharing/src/components/SharingInput.vue +++ b/apps/files_sharing/src/components/SharingInput.vue @@ -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 @@ -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)