Do not reuse the room

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2018-07-25 17:02:21 +02:00 committed by Daniel Calviño Sánchez
parent 55a983fd9f
commit f81f5e0a7c

View file

@ -109,18 +109,6 @@ class PublicShareAuthController extends OCSController {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
// If there is already a room for the share just return it.
$roomsForSharer = $this->manager->getRoomsForParticipant($sharerUser->getUID());
foreach ($roomsForSharer as $room) {
if ($room->getObjectType() === 'share:password' && $room->getObjectId() === $shareToken) {
return new DataResponse([
'token' => $room->getToken(),
'name' => $room->getName(),
'displayName' => $room->getName(),
]);
}
}
// Create the room
$room = $this->manager->createPublicRoom($share->getSharedWith(), 'share:password', $shareToken);
$room->addUsers([