mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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>
This commit is contained in:
parent
cb2b8dec85
commit
22ad2fe918
1 changed files with 6 additions and 7 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in a new issue