// since $userinfo isn't available for the hook we write it to the nav array
// this isn't optimal because the contact query will be done now twice
- $fields = ['id', 'url', 'avatar', 'micro', 'name', 'nick', 'baseurl'];
- if (local_user() && !empty($a->getUserId())) {
- $remoteUser = Contact::selectFirst($fields, ['uid' => $a->getUserId(), 'self' => true]);
+ $fields = ['id', 'url', 'avatar', 'micro', 'name', 'nick', 'baseurl', 'updated'];
+ if ($a->isLoggedIn()) {
+ $remoteUser = Contact::selectFirst($fields, ['uid' => $a->getLoggedInUserId(), 'self' => true]);
} elseif (!local_user() && remote_user()) {
$remoteUser = Contact::getById(remote_user(), $fields);
$nav_info['nav']['remote'] = DI::l10n()->t('Guest');
$followThread = [];
if (
local_user()
- && local_user() == $arr['item']['uid']
+ && in_array($arr['item']['uid'], [0, local_user()])
&& $arr['item']['gravity'] == GRAVITY_PARENT
&& !$arr['item']['self']
&& !$arr['item']['mention']