summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/user_status/lib/Connector/UserStatusProvider.php2
-rw-r--r--apps/user_status/lib/Db/UserStatusMapper.php4
-rw-r--r--apps/user_status/lib/Service/StatusService.php4
3 files changed, 4 insertions, 6 deletions
diff --git a/apps/user_status/lib/Connector/UserStatusProvider.php b/apps/user_status/lib/Connector/UserStatusProvider.php
index da0a6c635ce..a37d299e74e 100644
--- a/apps/user_status/lib/Connector/UserStatusProvider.php
+++ b/apps/user_status/lib/Connector/UserStatusProvider.php
@@ -62,6 +62,6 @@ class UserStatusProvider implements IProvider, ISettableProvider {
}
public function revertUserStatus(string $userId, string $messageId, string $status): void {
- $this->service->revertUserStatus($userId, $messageId, $status);
+ $this->service->revertUserStatus($userId, $messageId);
}
}
diff --git a/apps/user_status/lib/Db/UserStatusMapper.php b/apps/user_status/lib/Db/UserStatusMapper.php
index 1ef327a21f4..12d0be657b2 100644
--- a/apps/user_status/lib/Db/UserStatusMapper.php
+++ b/apps/user_status/lib/Db/UserStatusMapper.php
@@ -172,15 +172,13 @@ class UserStatusMapper extends QBMapper {
*
* @param string $userId
* @param string $messageId
- * @param string $status
* @return bool True if an entry was deleted
*/
- public function deleteCurrentStatusToRestoreBackup(string $userId, string $messageId, string $status): bool {
+ public function deleteCurrentStatusToRestoreBackup(string $userId, string $messageId): bool {
$qb = $this->db->getQueryBuilder();
$qb->delete($this->tableName)
->where($qb->expr()->eq('user_id', $qb->createNamedParameter($userId)))
->andWhere($qb->expr()->eq('message_id', $qb->createNamedParameter($messageId)))
- ->andWhere($qb->expr()->eq('status', $qb->createNamedParameter($status)))
->andWhere($qb->expr()->eq('is_backup', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)));
return $qb->executeStatement() > 0;
}
diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php
index efe05e10395..f2805ae9ae4 100644
--- a/apps/user_status/lib/Service/StatusService.php
+++ b/apps/user_status/lib/Service/StatusService.php
@@ -504,7 +504,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);
@@ -513,7 +513,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;