mirror of
https://github.com/friendica/friendica
synced 2025-04-22 05:50:13 +00:00
Improve the name of the "followers" receiver
This commit is contained in:
parent
1617e9fc64
commit
59630a2c82
3 changed files with 30 additions and 15 deletions
|
@ -28,6 +28,7 @@ use Friendica\Model\Group;
|
|||
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.
|
||||
|
@ -161,7 +162,16 @@ class PermissionTooltip extends \Friendica\BaseModule
|
|||
// 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 = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue