Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/SessionService.php')
-rw-r--r--lib/Service/SessionService.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Service/SessionService.php b/lib/Service/SessionService.php
index cb673335f..516045d20 100644
--- a/lib/Service/SessionService.php
+++ b/lib/Service/SessionService.php
@@ -222,6 +222,9 @@ class SessionService {
}
$session = $this->sessionMapper->find($documentId, $sessionId, $sessionToken);
$session->setGuestName($guestName);
+ $color = $this->avatarManager->getGuestAvatar($guestName)->avatarBackgroundColor($guestName);
+ $color = sprintf("#%02x%02x%02x", $color->r, $color->g, $color->b);
+ $session->setColor($color);
return $this->sessionMapper->update($session);
}
}