Skip to content

Commit

Permalink
fixup! fix(ooo): add new ooo status with new emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
miaulalala committed Dec 15, 2023
1 parent 4edbb36 commit a3b8146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/user_status/lib/Listener/OutOfOfficeStatusListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ public function __construct(private IJobList $jobsList,
public function handle(Event $event): void {
if($event instanceof OutOfOfficeClearedEvent) {
$this->manager->revertUserStatus($event->getData()->getUser()->getUID(), IUserStatus::MESSAGE_OUT_OF_OFFICE, IUserStatus::DND);
$this->jobsList->remove(UserStatusAutomation::class, ['userId' => $event->getData()->getUser()->getUID()] );
$this->jobsList->remove(UserStatusAutomation::class, ['userId' => $event->getData()->getUser()->getUID()]);
$this->jobsList->scheduleAfter(UserStatusAutomation::class, $this->time->getTime(), ['userId' => $event->getData()->getUser()->getUID()]);
return;
}

if ($event instanceof OutOfOfficeScheduledEvent
|| $event instanceof OutOfOfficeChangedEvent) {
// This might be overwritten by the office hours automation, but that is ok. This is just in case no office hours are set
$this->jobsList->remove(UserStatusAutomation::class, ['userId' => $event->getData()->getUser()->getUID()] );
$this->jobsList->remove(UserStatusAutomation::class, ['userId' => $event->getData()->getUser()->getUID()]);
$this->jobsList->scheduleAfter(UserStatusAutomation::class, $this->time->getTime(), ['userId' => $event->getData()->getUser()->getUID()]);
}
}
Expand Down

0 comments on commit a3b8146

Please sign in to comment.