]> git.mxchange.org Git - friendica.git/commitdiff
Improve PR 5984: better check for remote users as well
authorMichael <heluecht@pirati.ca>
Sun, 21 Oct 2018 21:56:46 +0000 (21:56 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 21 Oct 2018 21:56:46 +0000 (21:56 +0000)
include/conversation.php
src/Object/Post.php

index 9e813b5eb07ec6cccb14fa6831175efea87d4391..2ccdf8fb7236b748be1ef666cee7ed688885f258 100644 (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']);
        }
 }
index 15246786382ec70bbac61b928e52408a931f5178..70428ab8403f6db43be55c8c7c9ecf83bfeb46db 100644 (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'];