]> git.mxchange.org Git - friendica.git/commitdiff
Replace remaining explicit network value checks by Protocol::supportsFollow calls
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 9 Oct 2021 06:10:16 +0000 (02:10 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 9 Oct 2021 06:10:16 +0000 (02:10 -0400)
mod/unfollow.php
src/Content/Widget/VCard.php

index d566ac3cf440ec1c42b6ea42a07fc3c3651c0d2a..ac8ed40c31b969383f941b79ed04ae09a615a271 100644 (file)
@@ -67,7 +67,7 @@ function unfollow_content(App $a)
                // NOTREACHED
        }
 
-       if (!in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
+       if (!Protocol::supportsFollow($contact['network'])) {
                notice(DI::l10n()->t('Unfollowing is currently not supported by your network.'));
                DI::baseUrl()->redirect($base_return_path . '/' . $contact['id']);
                // NOTREACHED
index d66b60513efa6a08ba3fee49f5761b13d1fe9a9b..38b75272f52e0daeb8899ba34531ae1cdcfca595 100644 (file)
@@ -75,7 +75,7 @@ class VCard
                                $pending = $pcontact['pending'] ?? false;
                        }
 
-                       if (!$contact['self'] && in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
+                       if (!$contact['self'] && Protocol::supportsFollow($contact['network'])) {
                                if (in_array($rel, [Contact::SHARING, Contact::FRIEND])) {
                                        $unfollow_link = 'unfollow?url=' . urlencode($contact['url']) . '&auto=1';
                                } elseif (!$pending) {