From 9bb13fb05fffe9af94f1e57866a025382b71f5a4 Mon Sep 17 00:00:00 2001 From: Vinicius Cubas Brand Date: Fri, 29 Sep 2017 18:43:04 -0300 Subject: Created infrastructure to show circles' shared files There is a proposal to allow users to filter files shared to circles. This commit is needed to provide the infrastucture for it. Issue: https://github.com/nextcloud/circles/issues/137 Changes to comply to https://github.com/coletivoEITA/circles/pull/2 Polishing: get files shared to circles in caldav Signed-off-by: Vinicius Cubas Brand Signed-off-by: Maxence Lange Signed-off-by: Morris Jobke --- core/js/files/client.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/js/files/client.js b/core/js/files/client.js index 2017becf87c..98874d165bf 100644 --- a/core/js/files/client.js +++ b/core/js/files/client.js @@ -503,7 +503,7 @@ /** * Fetches a flat list of files filtered by a given filter criteria. - * (currently only system tags is supported) + * (currently system tags and circles are supported) * * @param {Object} filter filter criteria * @param {Object} [filter.systemTagIds] list of system tag ids to filter by @@ -525,7 +525,8 @@ properties = options.properties; } - if (!filter || (!filter.systemTagIds && _.isUndefined(filter.favorite))) { + if (!filter || + (!filter.systemTagIds && _.isUndefined(filter.favorite) && !filter.circlesIds) ) { throw 'Missing filter argument'; } @@ -551,6 +552,9 @@ _.each(filter.systemTagIds, function(systemTagIds) { body += ' ' + escapeHTML(systemTagIds) + '\n'; }); + _.each(filter.circlesIds, function(circlesIds) { + body += ' ' + escapeHTML(circlesIds) + '\n'; + }); if (filter.favorite) { body += ' ' + (filter.favorite ? '1': '0') + '\n'; } -- cgit v1.2.3