Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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 <[email protected]>
  • Loading branch information
nickvergessen authored and backportbot-nextcloud[bot] committed May 27, 2022
commit 421cbde0eb748965e6335c6d5772df4f8f6fdcf8
5 changes: 4 additions & 1 deletion apps/user_status/lib/Listener/UserLiveStatusListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@
*/
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;
}

Expand All @@ -62,7 +65,7 @@ public function handle(Event $event): void {

$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());
Expand Down