diff options
author | Joas Schilling <coding@schilljs.com> | 2022-05-27 09:15:15 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-05-27 09:21:33 +0200 |
commit | 5f2e7e971046ac6c7218b7655a5ebbce7d9a38a3 (patch) | |
tree | b0606adaa1ae993eb176259f03a3688eef77324b /apps/user_status | |
parent | 1aa1994f59a962fd1add38519e77fe075d269a67 (diff) | |
download | nextcloud-server-5f2e7e971046ac6c7218b7655a5ebbce7d9a38a3.tar.gz nextcloud-server-5f2e7e971046ac6c7218b7655a5ebbce7d9a38a3.zip |
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/user_status')
-rw-r--r-- | apps/user_status/lib/Listener/UserLiveStatusListener.php | 5 | ||||
-rw-r--r-- | apps/user_status/lib/Service/StatusService.php | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/user_status/lib/Listener/UserLiveStatusListener.php b/apps/user_status/lib/Listener/UserLiveStatusListener.php index c015e684142..3e05efa7118 100644 --- a/apps/user_status/lib/Listener/UserLiveStatusListener.php +++ b/apps/user_status/lib/Listener/UserLiveStatusListener.php @@ -43,11 +43,14 @@ use OCP\UserStatus\IUserStatus; */ class UserLiveStatusListener implements IEventListener { private UserStatusMapper $mapper; + private StatusService $statusService; private ITimeFactory $timeFactory; public function __construct(UserStatusMapper $mapper, + StatusService $statusService, ITimeFactory $timeFactory) { $this->mapper = $mapper; + $this->statusService = $statusService; $this->timeFactory = $timeFactory; } @@ -62,7 +65,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()); diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php index e038570fc00..9bf448d9de8 100644 --- a/apps/user_status/lib/Service/StatusService.php +++ b/apps/user_status/lib/Service/StatusService.php @@ -38,7 +38,6 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\DB\Exception; use OCP\IConfig; use OCP\IEmojiHelper; -use OCP\IUser; use OCP\UserStatus\IUserStatus; /** |