diff options
Diffstat (limited to 'apps/user_status/lib/Db/UserStatusMapper.php')
-rw-r--r-- | apps/user_status/lib/Db/UserStatusMapper.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/apps/user_status/lib/Db/UserStatusMapper.php b/apps/user_status/lib/Db/UserStatusMapper.php index f67cfcd472d..10939116a53 100644 --- a/apps/user_status/lib/Db/UserStatusMapper.php +++ b/apps/user_status/lib/Db/UserStatusMapper.php @@ -145,13 +145,9 @@ class UserStatusMapper extends QBMapper { * * @param int $timestamp */ - public function clearMessagesOlderThan(int $timestamp): void { + public function clearOlderThanClearAt(int $timestamp): void { $qb = $this->db->getQueryBuilder(); - $qb->update($this->tableName) - ->set('message_id', $qb->createNamedParameter(null)) - ->set('custom_icon', $qb->createNamedParameter(null)) - ->set('custom_message', $qb->createNamedParameter(null)) - ->set('clear_at', $qb->createNamedParameter(null)) + $qb->delete($this->tableName) ->where($qb->expr()->isNotNull('clear_at')) ->andWhere($qb->expr()->lte('clear_at', $qb->createNamedParameter($timestamp, IQueryBuilder::PARAM_INT))); |