Fix: Use correct follow notification texts

This commit is contained in:
Michael 2022-05-31 14:02:43 +00:00
parent 78a0c98a11
commit 7b219718c4
3 changed files with 98 additions and 89 deletions

View file

@ -127,12 +127,18 @@ class FormattedNavNotification extends BaseFactory
public function createFromIntro(\Friendica\Contact\Introduction\Entity\Introduction $intro): ValueObject\FormattedNavNotification
{
if (!isset(self::$contacts[$intro->cid])) {
self::$contacts[$intro->cid] = Contact::getById($intro->cid, ['name', 'url']);
self::$contacts[$intro->cid] = Contact::getById($intro->cid, ['name', 'url', 'pending']);
}
if (self::$contacts[$intro->cid]['pending']) {
$msg = $this->l10n->t('{0} wants to follow you');
} else {
$msg = $this->l10n->t('{0} has started following you');
}
return $this->createFromParams(
self::$contacts[$intro->cid],
$this->l10n->t('{0} wants to follow you'),
$msg,
$intro->datetime,
new Uri($this->baseUrl->get() . '/notifications/intros/' . $intro->id)
);