use Friendica\Protocol\ActivityPub;
use Friendica\Protocol\DFRN;
use Friendica\Protocol\Diaspora;
+use Friendica\Util\DateTimeFormat;
function display_init(App $a)
{
if (\Friendica\Util\Network::isLocalLink($author['url'])) {
\Friendica\Model\Profile::load(DI::app(), $author['nick'], false);
} else {
- $a->setProfileOwner($item['uid']);
DI::page()['aside'] = Widget\VCard::getHTML($author);
}
+ $a->setProfileOwner($item['uid']);
}
function display_fetchauthor($item)
}
$parent_uri_id = $item['parent-uri-id'];
}
+ $browser_update = intval(DI::pConfig()->get($update_uid, 'system', 'update_interval'));
+ if (!empty($browser_update)) {
+ $update_date = date(DateTimeFormat::MYSQL, time() - ($browser_update / 500));
+ if (!Post::exists(["`parent-uri-id` = ? AND `uid` IN (?, ?) AND `received` > ?", $parent_uri_id, 0, $update_uid, $update_date])) {
+ Logger::debug('No updated content', ['uri-id' => $uri_id, 'uid' => $update_uid, 'updated' => $update_date]);
+ return '';
+ } else {
+ Logger::debug('Updated content found', ['uri-id' => $uri_id, 'uid' => $update_uid, 'updated' => $update_date]);
+ }
+ }
} else {
$uri_id = ((DI::args()->getArgc() > 2) ? DI::args()->getArgv()[2] : 0);
$parent_uri_id = $uri_id;