diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Command/Room/TRoomCommand.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Command/Room/TRoomCommand.php b/lib/Command/Room/TRoomCommand.php index cb8bb2daa..fdb54431f 100644 --- a/lib/Command/Room/TRoomCommand.php +++ b/lib/Command/Room/TRoomCommand.php @@ -369,8 +369,13 @@ trait TRoomCommand { return []; } - return array_map(function (Participant $participant) { - return $participant->getUser(); - }, $room->searchParticipants($context->getCurrentWord())); + $users = []; + foreach ($room->searchParticipants($context->getCurrentWord()) as $participant) { + if (!$participant->isGuest()) { + $users[] = $participant->getUser(); + } + } + + return $users; } } |