Skip to content

Commit 1bf2714

Browse files
committed
feat(federation): update view metadata when updated on owner instance
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
1 parent 1d1373f commit 1bf2714

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

lib/Service/ShareService.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ private function findElementsSharedWithMe(string $elementType = 'table', ?string
234234
$shares = [];
235235
try {
236236
$shares['user'] = $this->mapper->findAllSharesFor($elementType, [$userId], $userId);
237+
237238
$userGroups = $this->userHelper->getGroupsForUser($userId);
238239
$userGroupIds = array_map(static fn (IGroup $group) => $group->getGid(), $userGroups);
239240
$shares['groups'] = $this->mapper->findAllSharesFor($elementType, $userGroupIds, $userId, ShareReceiverType::GROUP);

lib/Service/ViewService.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ public function update(int $id, ViewUpdateInput $data, ?string $userId = null, b
264264
$view->setLastEditBy($userId);
265265
$view->setLastEditAt($time->format('Y-m-d H:i:s'));
266266
$view = $this->mapper->update($view);
267+
268+
// notify federated shares about view metadata update
269+
$this->federationService->notifyNodeUpdate($view, 'view');
270+
267271
if (!$skipTableEnhancement) {
268272
$this->enhanceView($view, $userId);
269273
}

0 commit comments

Comments
 (0)