From 4b8af105616803f2cf08a759a896184b60b23c09 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 23 Nov 2018 11:09:43 -0500 Subject: [PATCH] Fix display of Connect/Disconnect links on contact page --- src/Module/Contact.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 80e9c73b63..ec7e896925 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -570,12 +570,12 @@ class Contact extends BaseModule /// @todo Only show the following link with DFRN when the remote version supports it $follow = ''; $follow_text = ''; - if (in_array($contact['rel'], [Model\Contact::FRIEND, Model\Contact::SHARING])) { + if ($contact['uid'] && in_array($contact['rel'], [Model\Contact::FRIEND, Model\Contact::SHARING])) { if (in_array($contact['network'], Protocol::NATIVE_SUPPORT)) { $follow = $a->getBaseURL(true) . '/unfollow?url=' . urlencode($contact['url']); $follow_text = L10n::t('Disconnect/Unfollow'); } - } else { + } elseif(!$contact['pending']) { $follow = $a->getBaseURL(true) . '/follow?url=' . urlencode($contact['url']); $follow_text = L10n::t('Connect/Follow'); } -- 2.39.5