diff options
Diffstat (limited to 'apps/user_status/lib/Controller')
-rw-r--r-- | apps/user_status/lib/Controller/UserStatusController.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/user_status/lib/Controller/UserStatusController.php b/apps/user_status/lib/Controller/UserStatusController.php index 214dc21f453..aded923d07f 100644 --- a/apps/user_status/lib/Controller/UserStatusController.php +++ b/apps/user_status/lib/Controller/UserStatusController.php @@ -185,6 +185,19 @@ class UserStatusController extends OCSController { } /** + * @NoAdminRequired + * + * @return DataResponse + */ + public function revertStatus(string $messageId): DataResponse { + $backupStatus = $this->service->revertUserStatus($this->userId, $messageId, true); + if ($backupStatus) { + return new DataResponse($this->formatStatus($backupStatus)); + } + return new DataResponse([]); + } + + /** * @param UserStatus $status * @return array */ |