diff options
author | Joas Schilling <coding@schilljs.com> | 2022-08-18 10:16:24 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-08-19 12:06:22 +0200 |
commit | 92f8710ac47665242790c1268a8967a827cf7a8c (patch) | |
tree | 843c271ec078177ade0e0d620ca570d77ccf56e6 /lib/Service/ParticipantService.php | |
parent | 97a955f2342f826ed5352021f665c07b78943e90 (diff) |
Use user displayname cache when ensuring 1-1 chat is filled
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Service/ParticipantService.php')
-rw-r--r-- | lib/Service/ParticipantService.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php index 852e33d7f..9742c2805 100644 --- a/lib/Service/ParticipantService.php +++ b/lib/Service/ParticipantService.php @@ -680,12 +680,12 @@ class ParticipantService { $missingUsers = array_diff($users, $participants); foreach ($missingUsers as $userId) { - $user = $this->userManager->get($userId); - if ($user instanceof IUser) { + $userDisplayName = $this->userManager->getDisplayName($userId); + if ($userDisplayName !== null) { $this->addUsers($room, [[ 'actorType' => Attendee::ACTOR_USERS, - 'actorId' => $user->getUID(), - 'displayName' => $user->getDisplayName(), + 'actorId' => $userId, + 'displayName' => $userDisplayName, 'participantType' => Participant::OWNER, ]]); } |