diff options
Diffstat (limited to 'lib/Controller/RoomController.php')
-rw-r--r-- | lib/Controller/RoomController.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index dfa99908b..21a97bea9 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -339,6 +339,10 @@ class RoomController extends OCSController { return new DataResponse([], Http::STATUS_NOT_FOUND); } + if ($this->userId === $targetUserName) { + return new DataResponse([], Http::STATUS_FORBIDDEN); + } + // If room exists: Reuse that one, otherwise create a new one. try { $room = $this->manager->getOne2OneRoom($this->userId, $targetUser->getUID()); |