From 304e6e6204ef22bc360427f46060c54ea925b589 Mon Sep 17 00:00:00 2001 From: Cristian Scheid Date: Fri, 13 Feb 2026 14:35:05 -0300 Subject: [PATCH 1/2] feat(recent-search): include recently uploaded files in addition to modified files Signed-off-by: Cristian Scheid --- lib/dav/davProperties.ts | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/lib/dav/davProperties.ts b/lib/dav/davProperties.ts index cda5d34a..2f02c279 100644 --- a/lib/dav/davProperties.ts +++ b/lib/dav/davProperties.ts @@ -119,9 +119,9 @@ export function getFavoritesReport(): string { } /** - * Get the SEARCH body to search for recently modified files + * Get the SEARCH body to search for recently modified/uploaded files * - * @param lastModified Oldest timestamp to include (Unix timestamp) + * @param timestamp Oldest timestamp to include (Unix timestamp) * @example * ```ts * // SEARCH for recent files need a different DAV endpoint @@ -139,7 +139,7 @@ export function getFavoritesReport(): string { * }) as ResponseDataDetailed * ``` */ -export function getRecentSearch(lastModified: number): string { +export function getRecentSearch(timestamp: number): string { return ` @@ -173,12 +173,20 @@ export function getRecentSearch(lastModified: number): string { 0 - - - - - ${lastModified} - + + + + + + ${timestamp} + + + + + + ${timestamp} + + From 26478368c7a9e488a4c082365a5346fb39920dd5 Mon Sep 17 00:00:00 2001 From: Cristian Scheid Date: Wed, 18 Feb 2026 13:01:29 -0300 Subject: [PATCH 2/2] fix(recent-search): only use upload_time if on nc versions that suppport it Signed-off-by: Cristian Scheid --- lib/dav/davProperties.ts | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/lib/dav/davProperties.ts b/lib/dav/davProperties.ts index 2f02c279..34ee47d2 100644 --- a/lib/dav/davProperties.ts +++ b/lib/dav/davProperties.ts @@ -140,6 +140,10 @@ export function getFavoritesReport(): string { * ``` */ export function getRecentSearch(timestamp: number): string { + const major = Number.parseInt((window.OC?.config?.version ?? '0').split('.')[0]) + const patch = Number.parseInt((window.OC?.config?.version ?? '0').split('.')[2]) + const supportsUploadTime = major > 33 || (major === 33 && patch > 0) + return ` @@ -173,20 +177,31 @@ export function getRecentSearch(timestamp: number): string { 0 - + ${supportsUploadTime + ? ` + + + + + + ${timestamp} + + + + + + ${timestamp} + + + ` + : ` ${timestamp} - - - - - ${timestamp} - - + `}