From d9458b303a422c968673dafc45367c0716037e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Fri, 29 Jun 2018 10:40:02 +0200 Subject: [PATCH] Add support for room shares to the share manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Room shares are implemented in an external app (Nextcloud Talk), so in order to keep the share manager as isolated as possible from room share specifics all the validity checks are done in the provider of room shares. However, due to the code structure it is necessary to explicitly check for room shares in "generalCreateChecks" to prevent an exception from being thrown. Signed-off-by: Daniel Calviño Sánchez --- lib/private/Share20/Manager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index d0316b44c1..7cfa83dbb4 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -239,6 +239,7 @@ class Manager implements IManager { if ($circle === null) { throw new \InvalidArgumentException('SharedWith is not a valid circle'); } + } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_ROOM) { } else { // We can't handle other types yet throw new \InvalidArgumentException('unknown share type');