use Friendica\Database\Database;
use Friendica\Database\DBA;
use Friendica\DI;
-use Friendica\Model\Contact;
use Friendica\Model\Item;
use Friendica\Model\Post;
use Friendica\Model\Verb;
class Engagement
{
+ /**
+ * Store engagement data from an item array
+ *
+ * @param array $item
+ * @return void
+ */
public static function storeFromItem(array $item)
{
if (!in_array($item['network'], Protocol::FEDERATED)) {
Logger::debug('Engagement stored', ['fields' => $engagement, 'ret' => $ret]);
}
+ /**
+ * Expire old engagement data
+ *
+ * @return void
+ */
public static function expire()
{
DBA::delete('post-engagement', ["`created` < ?", DateTimeFormat::utc('now - ' . DI::config()->get('channel', 'engagement_hours') . ' hour')]);