Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-11-26 13:02:49 +0300
committerJoas Schilling <coding@schilljs.com>2018-11-26 13:02:49 +0300
commit288b9d9822a43f62800dd0713196fe416e007950 (patch)
tree2cd4b4d409386a806889fe20fae5b065359fb067
parent0e19a13196fabd850df62286734966c848cf95cb (diff)
🙈v4.99.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/Controller/FilesController.php12
1 files changed, 1 insertions, 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',
]);
}