$follow_link = '';
$unfollow_link = '';
$wallmessage_link = '';
+ $mention_label = '';
+ $mention_link = '';
$showgroup_link = '';
$photo = Contact::getPhoto($contact);
$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'];
}
}
'$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'),
+ '$mention' => $mention_label,
+ '$mention_link' => $mention_link,
'$showgroup' => DI::l10n()->t('View group'),
'$showgroup_link' => $showgroup_link,
]);