diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-01-29 12:49:13 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-01-29 12:49:13 +0300 |
commit | 526de8e3ae5ea5ce6269a0bf814885c8076fd7dc (patch) | |
tree | af3d435259acb7f12f1402b5ebf60e0cb318dd46 /lib | |
parent | f86bc4a5c6730390fbba861f2c173f9f2ab41fe0 (diff) |
Return self-joined users in add participant search
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Collaboration/Collaborators/Listener.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Collaboration/Collaborators/Listener.php b/lib/Collaboration/Collaborators/Listener.php index b5b2136ef..a697675c7 100644 --- a/lib/Collaboration/Collaborators/Listener.php +++ b/lib/Collaboration/Collaborators/Listener.php @@ -27,6 +27,7 @@ use OCA\Talk\Config; use OCA\Talk\Exceptions\ParticipantNotFoundException; use OCA\Talk\Exceptions\RoomNotFoundException; use OCA\Talk\Manager; +use OCA\Talk\Participant; use OCA\Talk\Room; use OCP\Collaboration\AutoComplete\AutoCompleteEvent; use OCP\Collaboration\AutoComplete\IManager; @@ -127,7 +128,11 @@ class Listener { $userId = $result['value']['shareWith']; try { - $this->room->getParticipant($userId); + $participant = $this->room->getParticipant($userId); + if ($participant->getAttendee()->getParticipantType() === Participant::USER_SELF_JOINED) { + // do list self-joined users so they can be added as permanent participants by moderators + return true; + } return false; } catch (ParticipantNotFoundException $e) { return true; |