<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\Core\Protocol;
use Friendica\Core\Session\ISession;
use Friendica\Database\Database;
+use Friendica\Model\Contact;
use Friendica\Model\Post;
use Friendica\Module\BaseNotifications;
use Friendica\Network\HTTPException\InternalServerErrorException;
private $baseUrl;
/** @var L10n */
private $l10n;
- /** @var string */
- private $nurl;
public function __construct(LoggerInterface $logger, Database $dba, Repository\Notification $notification, BaseURL $baseUrl, L10n $l10n, App $app, IPConfig $pConfig, ISession $session)
{
$this->notification = $notification;
$this->baseUrl = $baseUrl;
$this->l10n = $l10n;
- $this->nurl = $app->contact['nurl'] ?? '';
}
/**
$formattedNotifications[] = new \Friendica\Object\Notification\Notification([
'label' => 'notification',
'link' => $this->baseUrl->get(true) . '/notification/' . $notification->id,
- 'image' => Proxy::proxifyUrl($notification->photo, false, Proxy::SIZE_MICRO),
+ 'image' => Contact::getAvatarUrlForUrl($notification->url, $notification->uid, Proxy::SIZE_MICRO),
'url' => $notification->url,
'text' => strip_tags(BBCode::convert($notification->msg)),
'when' => DateTimeFormat::local($notification->date, 'r'),