use Friendica\Model\Post;
use Friendica\Model\Tag;
use Friendica\Network\HTTPException;
+use Friendica\Protocol\ActivityPub;
/**
* Outputs the permission tooltip HTML content for the provided item, photo or event id.
// We only fetch "to" and "cc", because "bcc" should never be displayed
$receivers = [];
foreach (Tag::getByURIId($uriId, [Tag::TO, Tag::CC]) as $receiver) {
- $receivers[$receiver['type']][] = $receiver['name'];
+ if ($receiver['url'] == ActivityPub::PUBLIC_COLLECTION) {
+ $receivers[$receiver['type']][] = DI::l10n()->t('Public');
+ } else {
+ $apcontact = DBA::selectFirst('apcontact', ['name'], ['followers' => $receiver['url']]);
+ if (!empty($apcontact['name'])) {
+ $receivers[$receiver['type']][] = DI::l10n()->t('Followers (%s)', $apcontact['name']);
+ } else {
+ $receivers[$receiver['type']][] = $receiver['name'];
+ }
+ }
}
$output = '';
}
foreach (['as:to', 'as:cc', 'as:bto', 'as:bcc'] as $element) {
- if (!empty($urls[$element])) {
+ if ((empty($object_data['receiver_urls'][$element]) || in_array($element, ['as:bto', 'as:bcc'])) && !empty($urls[$element])) {
$object_data['receiver_urls'][$element] = array_unique(array_merge($object_data['receiver_urls'][$element] ?? [], $urls[$element]));
}
}
msgstr ""
"Project-Id-Version: 2022.05-dev\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-02-20 20:50+0000\n"
+"POT-Creation-Date: 2022-02-23 20:09+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"
msgstr ""
#: src/BaseModule.php:409 src/Content/Widget.php:231 src/Core/ACL.php:193
-#: src/Module/Contact.php:367 src/Module/PermissionTooltip.php:103
-#: src/Module/PermissionTooltip.php:125
+#: src/Module/Contact.php:367 src/Module/PermissionTooltip.php:104
+#: src/Module/PermissionTooltip.php:126
msgid "Followers"
msgstr ""
msgid "Yourself"
msgstr ""
-#: src/Core/ACL.php:200 src/Module/PermissionTooltip.php:109
-#: src/Module/PermissionTooltip.php:131
+#: src/Core/ACL.php:200 src/Module/PermissionTooltip.php:110
+#: src/Module/PermissionTooltip.php:132
msgid "Mutuals"
msgstr ""
msgid "Post to Email"
msgstr ""
-#: src/Core/ACL.php:319
+#: src/Core/ACL.php:319 src/Module/PermissionTooltip.php:166
msgid "Public"
msgstr ""
msgid "Unsupported or missing grant type"
msgstr ""
-#: src/Module/PermissionTooltip.php:44
+#: src/Module/PermissionTooltip.php:45
#, php-format
msgid "Wrong type \"%s\", expected one of: %s"
msgstr ""
-#: src/Module/PermissionTooltip.php:61
+#: src/Module/PermissionTooltip.php:62
msgid "Model not found"
msgstr ""
-#: src/Module/PermissionTooltip.php:88
+#: src/Module/PermissionTooltip.php:89
msgid "Remote privacy information not available."
msgstr ""
-#: src/Module/PermissionTooltip.php:97
+#: src/Module/PermissionTooltip.php:98
msgid "Visible to:"
msgstr ""
-#: src/Module/PermissionTooltip.php:174
+#: src/Module/PermissionTooltip.php:170
+#, php-format
+msgid "Followers (%s)"
+msgstr ""
+
+#: src/Module/PermissionTooltip.php:184
#, php-format
msgid "%d more"
msgstr ""
-#: src/Module/PermissionTooltip.php:178
+#: src/Module/PermissionTooltip.php:188
#, php-format
msgid "<b>To:</b> %s<br>"
msgstr ""
-#: src/Module/PermissionTooltip.php:181
+#: src/Module/PermissionTooltip.php:191
#, php-format
msgid "<b>CC:</b> %s<br>"
msgstr ""