File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -141,8 +141,10 @@ export function getFavoritesReport(): string {
141141 * ```
142142 */
143143export function getRecentSearch ( timestamp : number ) : string {
144- const capabilities = getCapabilities ( ) as { dav ?: { search_supports_upload_time ?: boolean } }
144+ const capabilities = getCapabilities ( ) as { dav ?: { search_supports_upload_time ?: boolean , search_supports_last_activity ?: boolean } }
145145 const supportsUploadTime = capabilities . dav ?. search_supports_upload_time
146+ const supportsLastActivity = capabilities . dav ?. search_supports_last_activity
147+ const orderByProp = supportsLastActivity ? '<nc:last_activity/>' : '<d:getlastmodified/>'
146148
147149 return `<?xml version="1.0" encoding="UTF-8"?>
148150<d:searchrequest ${ getDavNameSpaces ( ) }
@@ -207,7 +209,7 @@ export function getRecentSearch(timestamp: number): string {
207209 <d:orderby>
208210 <d:order>
209211 <d:prop>
210- <d:getlastmodified/>
212+ ${ orderByProp }
211213 </d:prop>
212214 <d:descending/>
213215 </d:order>
You can’t perform that action at this time.
0 commit comments