Some more places changed to the new contact avatar path format
This commit is contained in:
parent
4308cace68
commit
09aa496387
|
@ -624,7 +624,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
|
||||||
'indent' => '',
|
'indent' => '',
|
||||||
'owner_name' => '',
|
'owner_name' => '',
|
||||||
'owner_url' => '',
|
'owner_url' => '',
|
||||||
'owner_photo' => DI::baseUrl()->remove($item['owner-avatar']),
|
'owner_photo' => DI::baseUrl()->remove(Contact::getAvatarUrlForUrl($item['owner-link'], $item['uid'], Proxy::SIZE_THUMB)),
|
||||||
'plink' => Item::getPlink($item),
|
'plink' => Item::getPlink($item),
|
||||||
'edpost' => false,
|
'edpost' => false,
|
||||||
'isstarred' => 'unstarred',
|
'isstarred' => 'unstarred',
|
||||||
|
|
|
@ -25,8 +25,8 @@ use Friendica\BaseModule;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Database\DBA;
|
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\Photo;
|
use Friendica\Model\Photo;
|
||||||
use Friendica\Model\User;
|
use Friendica\Model\User;
|
||||||
use Friendica\Protocol\ActivityNamespace;
|
use Friendica\Protocol\ActivityNamespace;
|
||||||
|
@ -183,7 +183,7 @@ class Xrd extends BaseModule
|
||||||
[
|
[
|
||||||
'rel' => 'http://webfinger.net/rel/avatar',
|
'rel' => 'http://webfinger.net/rel/avatar',
|
||||||
'type' => $avatar['type'],
|
'type' => $avatar['type'],
|
||||||
'href' => $owner['photo'],
|
'href' => Contact::getAvatarUrlForUrl($owner['url'], $owner['uid']),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'rel' => 'http://joindiaspora.com/seed_location',
|
'rel' => 'http://joindiaspora.com/seed_location',
|
||||||
|
@ -239,7 +239,7 @@ class Xrd extends BaseModule
|
||||||
'$hcard_url' => $baseURL . '/hcard/' . $owner['nickname'],
|
'$hcard_url' => $baseURL . '/hcard/' . $owner['nickname'],
|
||||||
'$atom' => $owner['poll'],
|
'$atom' => $owner['poll'],
|
||||||
'$poco_url' => $owner['poco'],
|
'$poco_url' => $owner['poco'],
|
||||||
'$photo' => $owner['photo'],
|
'$photo' => Contact::getAvatarUrlForUrl($owner['url'], $owner['uid']),
|
||||||
'$type' => $avatar['type'],
|
'$type' => $avatar['type'],
|
||||||
'$salmon' => $baseURL . '/salmon/' . $owner['nickname'],
|
'$salmon' => $baseURL . '/salmon/' . $owner['nickname'],
|
||||||
'$salmen' => $baseURL . '/salmon/' . $owner['nickname'] . '/mention',
|
'$salmen' => $baseURL . '/salmon/' . $owner['nickname'] . '/mention',
|
||||||
|
|
|
@ -2222,8 +2222,9 @@ class Probe
|
||||||
|
|
||||||
$data = ['name' => $profile['name'], 'nick' => $profile['nick'], 'guid' => $approfile['diaspora:guid'] ?? '',
|
$data = ['name' => $profile['name'], 'nick' => $profile['nick'], 'guid' => $approfile['diaspora:guid'] ?? '',
|
||||||
'url' => $profile['url'], 'addr' => $profile['addr'], 'alias' => $profile['alias'],
|
'url' => $profile['url'], 'addr' => $profile['addr'], 'alias' => $profile['alias'],
|
||||||
'photo' => $profile['photo'], 'header' => $profile['header'], 'account-type' => $profile['contact-type'],
|
'photo' => Contact::getAvatarUrlForId($profile['id'], $profile['updated']),
|
||||||
'community' => ($profile['contact-type'] == User::ACCOUNT_TYPE_COMMUNITY),
|
'header' => $profile['header'] ? Contact::getHeaderUrlForId($profile['id'], $profile['updated']) : '',
|
||||||
|
'account-type' => $profile['contact-type'], 'community' => ($profile['contact-type'] == User::ACCOUNT_TYPE_COMMUNITY),
|
||||||
'keywords' => $profile['keywords'], 'location' => $profile['location'], 'about' => $profile['about'],
|
'keywords' => $profile['keywords'], 'location' => $profile['location'], 'about' => $profile['about'],
|
||||||
'hide' => !$profile['net-publish'], 'batch' => '', 'notify' => $profile['notify'],
|
'hide' => !$profile['net-publish'], 'batch' => '', 'notify' => $profile['notify'],
|
||||||
'poll' => $profile['poll'], 'request' => $profile['request'], 'confirm' => $profile['confirm'],
|
'poll' => $profile['poll'], 'request' => $profile['request'], 'confirm' => $profile['confirm'],
|
||||||
|
|
|
@ -69,7 +69,6 @@ class Post
|
||||||
private $thread = null;
|
private $thread = null;
|
||||||
private $redirect_url = null;
|
private $redirect_url = null;
|
||||||
private $owner_url = '';
|
private $owner_url = '';
|
||||||
private $owner_photo = '';
|
|
||||||
private $owner_name = '';
|
private $owner_name = '';
|
||||||
private $wall_to_wall = false;
|
private $wall_to_wall = false;
|
||||||
private $threaded = false;
|
private $threaded = false;
|
||||||
|
@ -474,7 +473,7 @@ class Post
|
||||||
'shiny' => $shiny,
|
'shiny' => $shiny,
|
||||||
'owner_self' => $item['author-link'] == Session::get('my_url'),
|
'owner_self' => $item['author-link'] == Session::get('my_url'),
|
||||||
'owner_url' => $this->getOwnerUrl(),
|
'owner_url' => $this->getOwnerUrl(),
|
||||||
'owner_photo' => DI::baseUrl()->remove($item['owner-avatar']),
|
'owner_photo' => DI::baseUrl()->remove(Contact::getAvatarUrlForUrl($item['owner-link'], $item['uid'], Proxy::SIZE_THUMB)),
|
||||||
'owner_name' => $this->getOwnerName(),
|
'owner_name' => $this->getOwnerName(),
|
||||||
'plink' => Item::getPlink($item),
|
'plink' => Item::getPlink($item),
|
||||||
'edpost' => $edpost,
|
'edpost' => $edpost,
|
||||||
|
@ -1007,7 +1006,6 @@ class Post
|
||||||
// Put this person as the wall owner of the wall-to-wall notice.
|
// Put this person as the wall owner of the wall-to-wall notice.
|
||||||
|
|
||||||
$this->owner_url = Contact::magicLinkByContact($a->page_contact);
|
$this->owner_url = Contact::magicLinkByContact($a->page_contact);
|
||||||
$this->owner_photo = $a->page_contact['thumb'];
|
|
||||||
$this->owner_name = $a->page_contact['name'];
|
$this->owner_name = $a->page_contact['name'];
|
||||||
$this->wall_to_wall = true;
|
$this->wall_to_wall = true;
|
||||||
} elseif ($this->getDataValue('owner-link')) {
|
} elseif ($this->getDataValue('owner-link')) {
|
||||||
|
@ -1025,7 +1023,6 @@ class Post
|
||||||
// But it could be somebody else with the same name. It just isn't highly likely.
|
// But it could be somebody else with the same name. It just isn't highly likely.
|
||||||
|
|
||||||
|
|
||||||
$this->owner_photo = $this->getDataValue('owner-avatar');
|
|
||||||
$this->owner_name = $this->getDataValue('owner-name');
|
$this->owner_name = $this->getDataValue('owner-name');
|
||||||
$this->wall_to_wall = true;
|
$this->wall_to_wall = true;
|
||||||
|
|
||||||
|
@ -1041,7 +1038,6 @@ class Post
|
||||||
if (!$this->wall_to_wall) {
|
if (!$this->wall_to_wall) {
|
||||||
$this->setTemplate('wall');
|
$this->setTemplate('wall');
|
||||||
$this->owner_url = '';
|
$this->owner_url = '';
|
||||||
$this->owner_photo = '';
|
|
||||||
$this->owner_name = '';
|
$this->owner_name = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue