diff options
author | Joas Schilling <coding@schilljs.com> | 2022-05-27 10:15:15 +0300 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2022-05-31 10:21:43 +0300 |
commit | 22ad2fe9187e60035bf0cab524b41791ba860faf (patch) | |
tree | c6d92441edffc5288f12df7804eea1b978e71357 /apps | |
parent | cb2b8dec858e814b1933929b93a5aef7a8f4ca9d (diff) |
Fix missing status with predefined status in drop-down
When a predefined status message was used, the status was not "processed"
so it was missing the translated message and the icon in the dropdown and the menu afterwards
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_status/lib/Listener/UserLiveStatusListener.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/user_status/lib/Listener/UserLiveStatusListener.php b/apps/user_status/lib/Listener/UserLiveStatusListener.php index 60b5fb7f3a4..8203069e78f 100644 --- a/apps/user_status/lib/Listener/UserLiveStatusListener.php +++ b/apps/user_status/lib/Listener/UserLiveStatusListener.php @@ -45,18 +45,17 @@ class UserLiveStatusListener implements IEventListener { /** @var UserStatusMapper */ private $mapper; + /** @var StatusService */ + private $statusService; + /** @var ITimeFactory */ private $timeFactory; - /** - * UserLiveStatusListener constructor. - * - * @param UserStatusMapper $mapper - * @param ITimeFactory $timeFactory - */ public function __construct(UserStatusMapper $mapper, + StatusService $statusService, ITimeFactory $timeFactory) { $this->mapper = $mapper; + $this->statusService = $statusService; $this->timeFactory = $timeFactory; } @@ -71,7 +70,7 @@ class UserLiveStatusListener implements IEventListener { $user = $event->getUser(); try { - $userStatus = $this->mapper->findByUserId($user->getUID()); + $userStatus = $this->statusService->findByUserId($user->getUID()); } catch (DoesNotExistException $ex) { $userStatus = new UserStatus(); $userStatus->setUserId($user->getUID()); |