}
$file_suffix = 'jpg';
+ $url = DI::baseUrl() . '/profile/' . $user['nickname'];
$fields = [
'name' => $profile['name'],
'xmpp' => $profile['xmpp'],
'matrix' => $profile['matrix'],
'network' => Protocol::DFRN,
- 'url' => DI::baseUrl() . '/profile/' . $user['nickname'],
+ 'url' => $url,
+ // it seems as if ported accounts can have wrong values, so we make sure that now everything is fine.
+ 'nurl' => Strings::normaliseLink($url),
+ 'uri-id' => ItemURI::getIdByURI($url),
'addr' => $user['nickname'] . '@' . substr(DI::baseUrl(), strpos(DI::baseUrl(), '://') + 3),
'request' => DI::baseUrl() . '/dfrn_request/' . $user['nickname'],
'notify' => DI::baseUrl() . '/dfrn_notify/' . $user['nickname'],
'poco' => DI::baseUrl() . '/poco/' . $user['nickname'],
];
- // it seems as if ported accounts can have wrong values, so we make sure that now everything is fine.
- $fields['nurl'] = Strings::normaliseLink($fields['url']);
- $fields['uri-id'] = ItemURI::getIdByURI($fields['url']);
$avatar = Photo::selectFirst(['resource-id', 'type'], ['uid' => $uid, 'profile' => true]);
if (DBA::isResult($avatar)) {
$new_pubkey = $ret['pubkey'] ?? '';
- if ($uid == 0) {
+ if ($uid == 0 && DI::config()->get('system', 'fetch_featured_posts')) {
if ($ret['network'] == Protocol::ACTIVITYPUB) {
$apcontact = APContact::getByURL($ret['url'], false);
if (!empty($apcontact['featured'])) {