From: Michael Date: Fri, 18 May 2018 12:26:10 +0000 (+0000) Subject: Fix: Sometimes the contact endpoints seem to be wrong X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8983c61023cc7af2d6f178913b5ca8e16f2f02b1;p=friendica.git Fix: Sometimes the contact endpoints seem to be wrong --- diff --git a/src/Model/Contact.php b/src/Model/Contact.php index d5f63554fb..03f5a36db1 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -206,6 +206,16 @@ class Contact extends BaseObject $fields['forum'] = $user['page-flags'] == PAGE_COMMUNITY; $fields['prv'] = $user['page-flags'] == PAGE_PRVGROUP; + // it seems as if ported accounts can have wrong values, so we make sure that now everything is fine. + $fields['url'] = System::baseUrl() . '/profile/' . $user['nickname']; + $fields['nurl'] = normalise_link($fields['url']); + $fields['addr'] = $user['nickname'] . '@' . substr(System::baseUrl(), strpos(System::baseUrl(), '://') + 3); + $fields['request'] = System::baseUrl() . '/dfrn_request/' . $user['nickname']; + $fields['notify'] = System::baseUrl() . '/dfrn_notify/' . $user['nickname']; + $fields['poll'] = System::baseUrl() . '/dfrn_poll/' . $user['nickname']; + $fields['confirm'] = System::baseUrl() . '/dfrn_confirm/' . $user['nickname']; + $fields['poco'] = System::baseUrl() . '/poco/' . $user['nickname']; + $update = false; foreach ($fields as $field => $content) {