mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Unified avatar paths
This commit is contained in:
parent
9edc75e29d
commit
19aef93560
7 changed files with 24 additions and 18 deletions
|
@ -33,6 +33,7 @@ use Friendica\Model\Post;
|
|||
use Friendica\Model\Verb;
|
||||
use Friendica\Protocol\Activity;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Proxy;
|
||||
use Friendica\Util\Temporal;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
|
@ -340,13 +341,9 @@ function ping_init(App $a)
|
|||
usort($notifications, $sort_function);
|
||||
|
||||
array_walk($notifications, function (&$notification) {
|
||||
if (empty($notification['photo'])) {
|
||||
$contact = Contact::getByURL($notification['url'], false, ['micro', 'id', 'avatar']);
|
||||
$notification['photo'] = Contact::getMicro($contact, $notification['photo']);
|
||||
}
|
||||
|
||||
$notification['photo'] = Contact::getAvatarUrlForUrl($notification['url'], local_user(), Proxy::SIZE_MICRO);
|
||||
$notification['timestamp'] = DateTimeFormat::local($notification['date']);
|
||||
$notification['date'] = Temporal::getRelativeDate($notification['date']);
|
||||
$notification['date'] = Temporal::getRelativeDate($notification['date']);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue