Merge remote-tracking branch 'upstream/develop' into channel-reshare-privat

pull/13866/head
Michael 2024-02-01 19:41:35 +00:00
commit b77a5c3eb4
3 changed files with 10 additions and 7 deletions

View File

@ -28,7 +28,6 @@ use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Util\Network;
use Friendica\Util\Strings;
/**
@ -42,9 +41,11 @@ class VCard
* Get HTML for vcard block
*
* @template widget/vcard.tpl
* @param array $contact
* @param bool $hide_mention
* @return string
*/
public static function getHTML(array $contact): string
public static function getHTML(array $contact, bool $hide_mention = false): string
{
if (!isset($contact['network']) || !isset($contact['id'])) {
Logger::warning('Incomplete contact', ['contact' => $contact ?? []]);
@ -99,10 +100,12 @@ class VCard
}
if ($contact['contact-type'] == Contact::TYPE_COMMUNITY) {
$mention_label = DI::l10n()->t('Post to group');
$mention_link = 'compose/0?body=!' . $contact['addr'];
if (!$hide_mention) {
$mention_label = DI::l10n()->t('Post to group');
$mention_link = 'compose/0?body=!' . $contact['addr'];
}
$showgroup_link = 'network/group/' . $id;
} else {
} elseif (!$hide_mention) {
$mention_label = DI::l10n()->t('Mention');
$mention_link = 'compose/0?body=@' . $contact['addr'];
}

View File

@ -107,7 +107,7 @@ class Conversations extends BaseModule
$this->page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput.css'));
$this->page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput-typeahead.css'));
$this->page['aside'] .= Widget\VCard::getHTML($contact);
$this->page['aside'] .= Widget\VCard::getHTML($contact, true);
Nav::setSelected('contact');

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 2024.03-dev\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-02-01 16:09+0000\n"
"POT-Creation-Date: 2024-02-01 16:16+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"