aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Collaboration/Reference
Commit message (Collapse)AuthorAgeFilesLines
* fix(FileReferenceEventListener): Invalidate cache after node was renamedfix/file_reference_invalidate_renameJonas2025-05-271-0/+5
| | | | | | Fixes: nextcloud/collectives#1527 Signed-off-by: Jonas <jonas@freesources.org>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-2/+2
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* feat(Reference): Add public API endpoints to get referencesJonas2024-07-171-11/+25
| | | | | | | | | | | | | | | | | | | | | | | Calling the public API endpoints will check for matching registered reference providers that implement `IPublicReferenceProvider` and call their respective functions. If no matching provider is found, the default `LinkReferenceProvider` will be used to provide open graph data. The frontend reference widget components will call these endpoints from unauthorized sessions, e.g. in public shares. If present, the sharing token of the origin URL is passed to `resolveReferencePublic()` as additional information for the reference provider to determine the access scope. This allows the respective reference providers to determine whether the origin share has access to the linked resource. `getCacheKeyPublic` also gets the sharing token so it can scope the cached entry to it. Contributes to #45978 Signed-off-by: Jonas <jonas@freesources.org>
* chore: Add SPDX headerAndy Scherzinger2024-05-245-91/+10
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Avoid clear cache with prefixJulius Härtl2024-03-081-1/+10
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* perf: switch places that always use the first getById result to getFirstNodeByIdRobin Appelman2024-03-041-6/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: Migrate LinkReferenceProvider to OCPAnupam Kumar2024-02-141-155/+4
| | | | | | | | | This would be useful to eleminate the need for using this OC class when an app dev wants to implement a custom reference provider for the web client but wants to fall back on opengraph for mobile clients. Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
* Refactors lib/private/Collaboration.Faraz Samapoor2023-10-035-82/+34
| | | | | | Mainly using PHP8's constructor property promotion. Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* avoid requests to opengraph image if no host detectedJulien Veyssier2023-06-091-16/+21
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* fix(references): Do not log errors on 404 responses of opengraph image fetchingJulius Härtl2023-03-131-0/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Implement file reference wigetJulius Härtl2023-03-021-9/+33
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* safer URL match in FileReferenceProviderJulien Veyssier2023-02-091-4/+4
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* Merge pull request #35160 from nextcloud/artonge/feat/version_naming_backendLouis2023-01-301-0/+6
|\ | | | | Allow to name a version
| * Adapt files_versions tests to modernized hooksLouis Chemineau2023-01-261-0/+6
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | style: Fix php-cs and psalmJulius Härtl2023-01-272-2/+4
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | improve getUserProviderTimestampsJulien Veyssier2023-01-271-3/+4
| | | | | | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* | use array_filter instead of array_map + array_searchJulien Veyssier2023-01-271-5/+5
| | | | | | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* | handle and return touchProvider errorsJulien Veyssier2023-01-271-1/+3
| | | | | | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* | add 'last used timestamp' management for reference providersJulien Veyssier2023-01-273-5/+58
| | | | | | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* | extend the reference API for the new link pickerJulien Veyssier2023-01-272-0/+124
|/ | | | | | | | | - add 2 interfaces for discoverable and searchable reference providers - new OCS route to get info on discoverable/searchable reference providers - new abstract ADiscoverableReferenceProvider that only implements jsonSerialize - listen to RenderReferenceEvent to inject provider list with initial state Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* improve link reference content-type check, accept 'text/html;*'Julien Veyssier2023-01-101-1/+3
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* in the link reference provider, check if the link content type begins with ↵Julien Veyssier2023-01-091-1/+3
| | | | | | text/html Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* add restrictions on content-type and content-size when downloading to ↵Julien Veyssier2023-01-051-0/+16
| | | | | | resolve with opengraph link provider Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* File reference: use the file type icon as fallback when no preview provider ↵Julien Veyssier2022-10-061-2/+14
| | | | | | for this type Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
* Move Reference class to public namespaceJulius Härtl2022-09-264-164/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Inject all dependnencies and increase cache timeoutJulius Härtl2022-08-313-6/+12
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Refactor cache handlingJulius Härtl2022-08-314-31/+131
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* CleanupJulius Härtl2022-08-314-41/+73
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Limit preview file sizeJulius Härtl2022-08-311-2/+10
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Move registration to IBootstrapJulius Härtl2022-08-311-9/+41
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add full public interfacesJulius Härtl2022-08-314-6/+8
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Implement image cachingJulius Härtl2022-08-313-3/+55
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add cache invalidationJulius Härtl2022-08-311-10/+41
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Implement reference provider based cachingJulius Härtl2022-08-313-13/+53
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Make reference fetching configurableJulius Härtl2022-08-312-10/+14
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* API for fetching reference metadataJulius Härtl2022-08-314-0/+401
Signed-off-by: Julius Härtl <jus@bitgrid.net>