Repository navigation
Conversation
5b7d9b7 to
240a3ac
Compare
| $this->applyStreamConditions($query, $userSettings, $user, 'all', $activeFilter, '', 0, null, false); | ||
| $this->applyTeamSearchCriteria($query, $search ?? SearchCriteria::empty(), $objectType === 'circles'); | ||
| $query->andWhere($query->expr()->eq('object_type', $query->createNamedParameter($objectType))); | ||
| $query->andWhere($query->expr()->in('object_id', $query->createNamedParameter($objectIds, IQueryBuilder::PARAM_INT_ARRAY))); |
There was a problem hiding this comment.
If I understand correctly, you filter the activity list based on the ids received form the ressource providers.
But the ressource providers for groupfolders only returns the top level file id, and not all the file ids contains within the groupfolders. So we will miss any activity on a file within the groupfolders.
As groupfolders can contains large number of files, $resourceScope->getObjectIds() should return an iterator and not an array. But even with that, I don't think this will scale, as the SQL query could be huge if it contains all the file ids.
One solution would be to join the filecache table, and to select files that are stored on the storage id of the groupfolder. This would be really custom to files though, but I don't think there is a better way to do it.
We faced a similar issue when bulding the "focus" view for the user's own files, and we are still trying to improve its perfomance as it is currently really slow. cc @come-nc
There was a problem hiding this comment.
I've switched this to a filecache join, similar to focused, so providers only need to return root IDs—no recursive traversal or huge ID lists.
We filter by storage and subtree, then check candidates against the viewer's mounts and ACLs. Pagination keeps fetching past inaccessible entries.
Is it a better way?
2b938de to
a332a2e
Compare
Assisted-by: GitHubCopilot:GPT-5.6-Terra Signed-off-by: Stefan Lender <Stefan.Lender@dataport.de>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Stefan Lender <Stefan.Lender@dataport.de>
a332a2e to
6085032
Compare
Resolves: nextcloud/circles#2692
Needs Server/OCP-Change: nextcloud/server#65347
Adds a Team Activity stream that combines Team roster events with activity from resources shared with the Team.
The stream verifies membership, resolves only resources the viewer can currently access, deduplicates recipient-specific file events, and preserves stable pagination, filters, search, and ETag behavior.
It adds resource-provider support through ITeamActivityResourceProvider, covers the resolver, stream pagination, response behavior, and documents the new API endpoint.
🤖 AI (if applicable)