mirror of
https://github.com/friendica/friendica
synced 2025-04-26 12:30:11 +00:00
Fix: Use correct follow notification texts
This commit is contained in:
parent
78a0c98a11
commit
7b219718c4
3 changed files with 98 additions and 89 deletions
|
@ -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)
|
||||
);
|
||||
|
|
|
@ -126,8 +126,7 @@ class Notification extends BaseFactory implements ICanCreateFromTableRow
|
|||
}
|
||||
|
||||
if ($Notification->type === Post\UserNotification::TYPE_NONE) {
|
||||
$localRelationship = $this->localRelationshipRepo->getForUserContact($Notification->uid, $Notification->actorId);
|
||||
if ($localRelationship->pending) {
|
||||
if ($causer['pending']) {
|
||||
$msg = $this->l10n->t('%1$s wants to follow you');
|
||||
} else {
|
||||
$msg = $this->l10n->t('%1$s has started following you');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue