From: Hypolite Petovan Date: Fri, 31 Aug 2018 01:03:57 +0000 (-0400) Subject: Add Protocol::NATIVE_SUPPORT constant usage to mod/contacts X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e25c579c76b0721b06c477f82356cc2e824ce53a;p=friendica.git Add Protocol::NATIVE_SUPPORT constant usage to mod/contacts --- diff --git a/mod/contacts.php b/mod/contacts.php index 38896a611a..227a48b965 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -595,17 +595,12 @@ function contacts_content(App $a, $update = 0) /// @todo Only show the following link with DFRN when the remote version supports it $follow = ''; $follow_text = ''; - if ($contact['network'] != Protocol::STATUSNET) { - if (in_array($contact['rel'], [Contact::FRIEND, Contact::SHARING])) { + if (in_array($contact['rel'], [Contact::FRIEND, Contact::SHARING])) { + if (in_array($contact['network'], Protocol::NATIVE_SUPPORT)) { $follow = System::baseUrl(true) . "/unfollow?url=" . urlencode($contact["url"]); $follow_text = L10n::t("Disconnect/Unfollow"); - } else { - $follow = System::baseUrl(true) . "/follow?url=" . urlencode($contact["url"]); - $follow_text = L10n::t("Connect/Follow"); } - } - - if ($contact['uid'] == 0) { + } else { $follow = System::baseUrl(true) . "/follow?url=" . urlencode($contact["url"]); $follow_text = L10n::t("Connect/Follow"); }