From 5be76411fa9cb9b883ae6c0405b44b3b6bc855e7 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Wed, 16 Oct 2024 15:01:00 +0200 Subject: fix: dismiss notification only after transfer bg job created - do not create 'denied' notification if bg job exists Signed-off-by: Maksim Sukharev --- apps/files/lib/Controller/TransferOwnershipController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/files/lib/Controller') diff --git a/apps/files/lib/Controller/TransferOwnershipController.php b/apps/files/lib/Controller/TransferOwnershipController.php index a71373baae4..3564b08ad6a 100644 --- a/apps/files/lib/Controller/TransferOwnershipController.php +++ b/apps/files/lib/Controller/TransferOwnershipController.php @@ -140,11 +140,6 @@ class TransferOwnershipController extends OCSController { return new DataResponse([], Http::STATUS_FORBIDDEN); } - $notification = $this->notificationManager->createNotification(); - $notification->setApp('files') - ->setObject('transfer', (string)$id); - $this->notificationManager->markProcessed($notification); - $newTransferOwnership = new TransferOwnershipEntity(); $newTransferOwnership->setNodeName($transferOwnership->getNodeName()); $newTransferOwnership->setFileId($transferOwnership->getFileId()); @@ -156,6 +151,11 @@ class TransferOwnershipController extends OCSController { 'id' => $newTransferOwnership->getId(), ]); + $notification = $this->notificationManager->createNotification(); + $notification->setApp('files') + ->setObject('transfer', (string)$id); + $this->notificationManager->markProcessed($notification); + return new DataResponse([], Http::STATUS_OK); } -- cgit v1.2.3