From 02f07583df4b4cb5e383d1a7f50984ca863ed337 Mon Sep 17 00:00:00 2001 From: dante di domenico Date: Mon, 16 Sep 2024 17:19:56 +0200 Subject: [PATCH] fix: remove streams --- src/Controller/TrashController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Controller/TrashController.php b/src/Controller/TrashController.php index 2d93e8a88..685b89dec 100644 --- a/src/Controller/TrashController.php +++ b/src/Controller/TrashController.php @@ -165,7 +165,10 @@ public function delete(): ?Response $ids = [$this->getRequest()->getData('id')]; } try { + $response = $this->apiClient->get('/streams', ['filter' => ['object_id' => $ids]]); $this->apiClient->removeObjects($ids); + $streams = (array)Hash::get($response, 'data'); + $this->removeStreams($streams); $this->Flash->success(__('Object(s) deleted from trash')); } catch (BEditaClientException $e) { // Error! Back to object view.