1
1
Fork 0

Merge pull request #5986 from annando/improve-5984

Improve PR 5984: better check for remote users as well
This commit is contained in:
rabuzarus 2018-10-22 00:03:19 +02:00 committed by GitHub
commit 72a7671010
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -354,7 +354,7 @@ function localize_item(&$item)
'network' => $item['author-network'], 'url' => $item['author-link']];
// Only create a redirection to a magic link when logged in
if (!empty($item['plink']) && local_user()) {
if (!empty($item['plink']) && (local_user() || remote_user())) {
$item['plink'] = Contact::magicLinkbyContact($author, $item['plink']);
}
}

View file

@ -210,7 +210,7 @@ class Post extends BaseObject
$author = ['uid' => 0, 'id' => $item['author-id'],
'network' => $item['author-network'], 'url' => $item['author-link']];
if (local_user()) {
if (local_user() || remote_user()) {
$profile_link = Contact::magicLinkbyContact($author);
} else {
$profile_link = $item['author-link'];