index and return parentid in search report

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2022-10-07 10:52:14 +00:00
parent c4b09b0e02
commit 1bb7d57caf
17 changed files with 117 additions and 450 deletions
+7
View File
@@ -171,6 +171,13 @@ func matchToPropResponse(ctx context.Context, match *searchmsg.Match) (*propfind
SpaceId: match.Entity.Id.SpaceId,
OpaqueId: match.Entity.Id.OpaqueId,
})))
if match.Entity.ParentId != nil {
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:file-parent", storagespace.FormatResourceID(provider.ResourceId{
StorageId: match.Entity.ParentId.StorageId,
SpaceId: match.Entity.ParentId.SpaceId,
OpaqueId: match.Entity.ParentId.OpaqueId,
})))
}
if match.Entity.Ref.ResourceId.StorageId == utils.ShareStorageProviderID {
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:shareid", match.Entity.Ref.ResourceId.OpaqueId))
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:shareroot", match.Entity.ShareRootName))