kopia lustrzana https://github.com/friendica/friendica
Replace remaining explicit network value checks by Protocol::supportsFollow calls
rodzic
5028258c3b
commit
b214470b1a
|
@ -67,7 +67,7 @@ function unfollow_content(App $a)
|
||||||
// NOTREACHED
|
// 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.'));
|
notice(DI::l10n()->t('Unfollowing is currently not supported by your network.'));
|
||||||
DI::baseUrl()->redirect($base_return_path . '/' . $contact['id']);
|
DI::baseUrl()->redirect($base_return_path . '/' . $contact['id']);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
|
|
|
@ -75,7 +75,7 @@ class VCard
|
||||||
$pending = $pcontact['pending'] ?? false;
|
$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])) {
|
if (in_array($rel, [Contact::SHARING, Contact::FRIEND])) {
|
||||||
$unfollow_link = 'unfollow?url=' . urlencode($contact['url']) . '&auto=1';
|
$unfollow_link = 'unfollow?url=' . urlencode($contact['url']) . '&auto=1';
|
||||||
} elseif (!$pending) {
|
} elseif (!$pending) {
|
||||||
|
|
Ładowanie…
Reference in New Issue