Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_status/lib/Service/StatusService.php')
-rw-r--r--apps/user_status/lib/Service/StatusService.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php
index 858db48f31f..1b7b44d95d3 100644
--- a/apps/user_status/lib/Service/StatusService.php
+++ b/apps/user_status/lib/Service/StatusService.php
@@ -496,7 +496,7 @@ class StatusService {
}
}
- public function revertUserStatus(string $userId, string $messageId, string $status): void {
+ public function revertUserStatus(string $userId, string $messageId): void {
try {
/** @var UserStatus $userStatus */
$backupUserStatus = $this->mapper->findByUserId($userId, true);
@@ -505,7 +505,7 @@ class StatusService {
return;
}
- $deleted = $this->mapper->deleteCurrentStatusToRestoreBackup($userId, $messageId, $status);
+ $deleted = $this->mapper->deleteCurrentStatusToRestoreBackup($userId, $messageId);
if (!$deleted) {
// Another status is set automatically or no status, do nothing
return;
@@ -517,7 +517,7 @@ class StatusService {
$this->mapper->update($backupUserStatus);
}
- public function revertMultipleUserStatus(array $userIds, string $messageId, string $status): void {
+ public function revertMultipleUserStatus(array $userIds, string $messageId): void {
// Get all user statuses and the backups
$findById = $userIds;
foreach ($userIds as $userId) {
@@ -528,8 +528,7 @@ class StatusService {
$backups = $restoreIds = $statuesToDelete = [];
foreach ($userStatuses as $userStatus) {
if (!$userStatus->getIsBackup()
- && $userStatus->getMessageId() === $messageId
- && $userStatus->getStatus() === $status) {
+ && $userStatus->getMessageId() === $messageId) {
$statuesToDelete[$userStatus->getUserId()] = $userStatus->getId();
} else if ($userStatus->getIsBackup()) {
$backups[$userStatus->getUserId()] = $userStatus->getId();