зеркало из https://github.com/nextcloud/spreed.git
Reduce complexity for autocomplete suggestions
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
62aae8ad96
Коммит
6b6ccabd99
|
@ -406,15 +406,8 @@ trait TRoomCommand {
|
|||
return [];
|
||||
}
|
||||
|
||||
$users = [];
|
||||
$participants = $this->participantService->getParticipantsForRoom($room);
|
||||
foreach ($participants as $participant) {
|
||||
if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_USERS
|
||||
&& stripos($participant->getAttendee()->getActorId(), $context->getCurrentWord()) !== false) {
|
||||
$users[] = $participant->getAttendee()->getActorId();
|
||||
}
|
||||
}
|
||||
|
||||
return $users;
|
||||
return array_filter($this->participantService->getParticipantUserIds($room), static function ($userId) use ($context) {
|
||||
return stripos($userId, $context->getCurrentWord()) !== false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче