mirror of
https://github.com/friendica/friendica
synced 2025-04-30 15:04:23 +02:00
Don't display the "follow/unfollow" vcard-link on pages meant for follow/unfollow
This commit is contained in:
parent
ad65e56b16
commit
8b75aab4ad
4 changed files with 6 additions and 5 deletions
|
@ -43,9 +43,10 @@ class VCard
|
|||
* @template widget/vcard.tpl
|
||||
* @param array $contact
|
||||
* @param bool $hide_mention
|
||||
* @param bool $hide_follow
|
||||
* @return string
|
||||
*/
|
||||
public static function getHTML(array $contact, bool $hide_mention = false): string
|
||||
public static function getHTML(array $contact, bool $hide_mention = false, bool $hide_follow = false): string
|
||||
{
|
||||
if (!isset($contact['network']) || !isset($contact['id'])) {
|
||||
Logger::warning('Incomplete contact', ['contact' => $contact ?? []]);
|
||||
|
@ -87,7 +88,7 @@ class VCard
|
|||
}
|
||||
}
|
||||
|
||||
if (empty($contact['self']) && Protocol::supportsFollow($contact['network'])) {
|
||||
if (!$hide_follow && empty($contact['self']) && Protocol::supportsFollow($contact['network'])) {
|
||||
if (in_array($rel, [Contact::SHARING, Contact::FRIEND])) {
|
||||
$unfollow_link = 'contact/unfollow?url=' . urlencode($contact_url) . '&auto=1';
|
||||
} elseif (!$pending) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue