From 288b9d9822a43f62800dd0713196fe416e007950 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 26 Nov 2018 11:02:49 +0100 Subject: =?UTF-8?q?=F0=9F=99=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Joas Schilling --- lib/Controller/FilesController.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/Controller/FilesController.php b/lib/Controller/FilesController.php index 371344a09..60ad9cf92 100644 --- a/lib/Controller/FilesController.php +++ b/lib/Controller/FilesController.php @@ -89,19 +89,9 @@ class FilesController extends OCSController { * or "404 Not found" if the given file id was invalid. */ public function getRoom(string $fileId): DataResponse { - $share = $this->util->getAnyDirectShareOfFileAccessibleByUser($fileId, $this->currentUser); - if (!$share) { - throw new OCSNotFoundException($this->l->t('File is not shared, or shared but not with the user')); - } - - try { - $room = $this->manager->getRoomByObject('file', $fileId); - } catch (RoomNotFoundException $e) { - $room = $this->manager->createPublicRoom('', 'file', $fileId); - } return new DataResponse([ - 'token' => $room->getToken() + 'token' => 'd9i6cepf', ]); } -- cgit v1.2.3