- // Show this tab only if there is visible friend list
- $x = Model\Contact\Relation::countFollows($pcid);
- if ($x) {
- $tabs[] = ['label' => DI::l10n()->t('Contacts'),
- 'url' => "allfriends/" . $pcid,
- 'sel' => (($active_tab == 4) ? 'active' : ''),
- 'title' => DI::l10n()->t('View all contacts'),
- 'id' => 'allfriends-tab',
- 'accesskey' => 't'];
- }
-
- // Show this tab only if there is visible common friend list
- $common = Model\GContact::countCommonFriends(local_user(), $cid);
- if ($common) {
- $tabs[] = ['label' => DI::l10n()->t('Common Friends'),
- 'url' => "common/loc/" . local_user() . "/" . $cid,
- 'sel' => (($active_tab == 5) ? 'active' : ''),
- 'title' => DI::l10n()->t('View all common friends'),
- 'id' => 'common-loc-tab',
- 'accesskey' => 'd'
- ];
- }
-
- if ($cid != $pcid) {
+ if (!empty($contact['network']) && in_array($contact['network'], [Protocol::FEED, Protocol::MAIL]) && ($cid != $pcid)) {