diff --git a/lib/dav/davProperties.ts b/lib/dav/davProperties.ts index cda5d34a..34ee47d2 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,11 @@ export function getFavoritesReport(): string { * }) as ResponseDataDetailed * ``` */ -export function getRecentSearch(lastModified: number): 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,12 +177,31 @@ export function getRecentSearch(lastModified: number): string { 0 - - - - - ${lastModified} - + ${supportsUploadTime + ? ` + + + + + + ${timestamp} + + + + + + ${timestamp} + + + ` + : ` + + + + + ${timestamp} + + `}