File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 44 */
55
66import { getCurrentUser } from '@nextcloud/auth'
7+ import { getCapabilities } from '@nextcloud/capabilities'
78import { scopedGlobals } from '../globalScope.ts'
89import logger from '../utils/logger.ts'
910
@@ -140,9 +141,8 @@ export function getFavoritesReport(): string {
140141 * ```
141142 */
142143export function getRecentSearch ( timestamp : number ) : string {
143- const major = Number . parseInt ( ( window . OC ?. config ?. version ?? '0' ) . split ( '.' ) [ 0 ] )
144- const patch = Number . parseInt ( ( window . OC ?. config ?. version ?? '0' ) . split ( '.' ) [ 2 ] )
145- const supportsUploadTime = major > 33 || ( major === 33 && patch > 0 )
144+ const capabilities = getCapabilities ( ) as { dav ?: { search_supports_upload_time ?: boolean } }
145+ const supportsUploadTime = capabilities . dav ?. search_supports_upload_time
146146
147147 return `<?xml version="1.0" encoding="UTF-8"?>
148148<d:searchrequest ${ getDavNameSpaces ( ) }
You can’t perform that action at this time.
0 commit comments