diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-08-13 01:51:08 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-08-16 21:18:30 +0300 |
commit | 878962d6afbcd61d9552b66596ba25688b0285c1 (patch) | |
tree | 3ed25ed474a085d48f930b9d9516ddbf58bf958a /lib/Controller | |
parent | 9fb2de46317c6aba0e844d67577becb653505483 (diff) |
Add user to file room when joining it instead of when getting its token
This fixes the code so it behaves as stated in the documentation.
In practice currently this should make no difference, as in the Files
app the user joins the room immediately after getting its token;
however, this makes possible to get the token without joining the room,
which will be needed in the future to improve the UX of the Files app.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/Controller')
-rw-r--r-- | lib/Controller/FilesController.php | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/Controller/FilesController.php b/lib/Controller/FilesController.php index 451086c35..bc45eda10 100644 --- a/lib/Controller/FilesController.php +++ b/lib/Controller/FilesController.php @@ -104,12 +104,6 @@ class FilesController extends OCSController { $room = $this->manager->createPublicRoom($name, 'file', $fileId); } - try { - $room->getParticipant($this->currentUser); - } catch (ParticipantNotFoundException $e) { - $room->addUsers(['userId' => $this->currentUser]); - } - return new DataResponse([ 'token' => $room->getToken() ]); |