friendica-github/src/Worker/SetSeen.php

24 lines
501 B
PHP
Raw Normal View History

<?php
2024-08-24 15:27:00 +02:00
// Copyright (C) 2010-2024, the Friendica project
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
//
// SPDX-License-Identifier: AGPL-3.0-or-later
namespace Friendica\Worker;
use Friendica\Core\Logger;
use Friendica\Model\Item;
/**
* Set posts seen for the given user.
*/
class SetSeen
{
public static function execute(int $uid)
{
$ret = Item::update(['unseen' => false], ['unseen' => true, 'uid' => $uid]);
Logger::debug('Set seen', ['uid' => $uid, 'ret' => $ret]);
}
}