]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Widget/VCard.php
Merge remote-tracking branch 'upstream/2023.09-rc' into channel-improvements
[friendica.git] / src / Content / Widget / VCard.php
index 0d78fed4a489016c113c5eb4a2e78abf99b93d0d..1d5cde87b4794cac65d532a94d3c2410e667e511 100644 (file)
@@ -68,6 +68,8 @@ class VCard
                $follow_link      = '';
                $unfollow_link    = '';
                $wallmessage_link = '';
+               $mention_label    = '';
+               $mention_link     = '';
                $showgroup_link   = '';
 
                $photo   = Contact::getPhoto($contact);
@@ -101,8 +103,13 @@ class VCard
                                $wallmessage_link = 'message/new/' . $id;
                        }
 
-                       if (in_array($rel, [Contact::SHARING])) {
+                       if ($contact['contact-type'] == Contact::TYPE_COMMUNITY) {
+                               $mention_label  = DI::l10n()->t('Post to group');
+                               $mention_link   = 'compose/0?body=!' . $contact['addr'];
                                $showgroup_link = 'network/group/' . $id;
+                       } else {
+                               $mention_label = DI::l10n()->t('Mention');
+                               $mention_link  = 'compose/0?body=@' . $contact['addr'];
                        }
                }
 
@@ -124,9 +131,9 @@ class VCard
                        '$unfollow_link'    => $unfollow_link,
                        '$wallmessage'      => DI::l10n()->t('Message'),
                        '$wallmessage_link' => $wallmessage_link,
-                       '$mentioning'       => DI::l10n()->t('Mention'),
-                       '$post2group'       => DI::l10n()->t('Post to group'),
-                       '$showgroup'        => DI::l10n()->t('Show group'),
+                       '$mention'          => $mention_label,
+                       '$mention_link'     => $mention_link,
+                       '$showgroup'        => DI::l10n()->t('View group'),
                        '$showgroup_link'   => $showgroup_link,
                ]);
        }