2024-06-23 21:24:19 +00:00
|
|
|
<?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
|
2024-06-23 21:24:19 +00:00
|
|
|
|
|
|
|
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]);
|
|
|
|
}
|
|
|
|
}
|