enhancement: add spaceid to sse (#8620)

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
kobergj
2024-03-12 10:59:03 +01:00
committed by GitHub
parent db3ed9fc4e
commit 7b92907713
3 changed files with 8 additions and 0 deletions
@@ -0,0 +1,5 @@
Enhancement: Add the spaceID to sse
Adds the spaceID to all clientlog sse messages
https://github.com/owncloud/ocis/pull/8614
+1
View File
@@ -4,4 +4,5 @@ package service
type FileEvent struct {
ParentItemID string `json:"parentitemid"`
ItemID string `json:"itemid"`
SpaceID string `json:"spaceid"`
}
@@ -120,6 +120,7 @@ func (cl *ClientlogService) processEvent(event events.Event) {
ItemID: storagespace.FormatResourceID(*e.ID),
// TODO: check with web if parentID is needed
// ParentItemID: storagespace.FormatResourceID(*item.GetRef().GetResourceId()),
SpaceID: e.ID.GetSpaceId(),
}
users, err = utils.GetSpaceMembers(ctx, e.ID.GetSpaceId(), gwc, utils.ViewerRole)
@@ -181,6 +182,7 @@ func processFileEvent(ctx context.Context, ref *provider.Reference, gwc gateway.
data := FileEvent{
ParentItemID: storagespace.FormatResourceID(*info.GetParentId()),
ItemID: storagespace.FormatResourceID(*info.GetId()),
SpaceID: info.GetSpace().GetId().GetOpaqueId(),
}
users, err := utils.GetSpaceMembers(ctx, info.GetSpace().GetId().GetOpaqueId(), gwc, utils.ViewerRole)