summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-08-18 10:16:24 +0200
committerJoas Schilling <coding@schilljs.com>2022-08-19 12:06:22 +0200
commit92f8710ac47665242790c1268a8967a827cf7a8c (patch)
tree843c271ec078177ade0e0d620ca570d77ccf56e6 /lib
parent97a955f2342f826ed5352021f665c07b78943e90 (diff)
Use user displayname cache when ensuring 1-1 chat is filled
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/ParticipantService.php8
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,
]]);
}