diff options
Diffstat (limited to 'apps/user_status/lib/Controller/UserStatusController.php')
-rw-r--r-- | apps/user_status/lib/Controller/UserStatusController.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/user_status/lib/Controller/UserStatusController.php b/apps/user_status/lib/Controller/UserStatusController.php index a231103e91e..8708a7c2aac 100644 --- a/apps/user_status/lib/Controller/UserStatusController.php +++ b/apps/user_status/lib/Controller/UserStatusController.php @@ -99,6 +99,8 @@ class UserStatusController extends OCSController { public function setStatus(string $statusType): DataResponse { try { $status = $this->service->setStatus($this->userId, $statusType, null, true); + + $this->service->removeBackupUserStatus($this->userId); return new DataResponse($this->formatStatus($status)); } catch (InvalidStatusTypeException $ex) { $this->logger->debug('New user-status for "' . $this->userId . '" was rejected due to an invalid status type "' . $statusType . '"'); @@ -118,6 +120,7 @@ class UserStatusController extends OCSController { ?int $clearAt): DataResponse { try { $status = $this->service->setPredefinedMessage($this->userId, $messageId, $clearAt); + $this->service->removeBackupUserStatus($this->userId); return new DataResponse($this->formatStatus($status)); } catch (InvalidClearAtException $ex) { $this->logger->debug('New user-status for "' . $this->userId . '" was rejected due to an invalid clearAt value "' . $clearAt . '"'); @@ -147,6 +150,7 @@ class UserStatusController extends OCSController { $this->service->clearMessage($this->userId); $status = $this->service->findByUserId($this->userId); } + $this->service->removeBackupUserStatus($this->userId); return new DataResponse($this->formatStatus($status)); } catch (InvalidClearAtException $ex) { $this->logger->debug('New user-status for "' . $this->userId . '" was rejected due to an invalid clearAt value "' . $clearAt . '"'); |