Issue 6477: Automatically repair self contact avatar

This commit is contained in:
Michael 2019-06-19 17:05:29 +00:00
parent b48a49b0f5
commit 4ab772ed67
6 changed files with 84 additions and 90 deletions

View file

@ -229,11 +229,6 @@ class Transmitter
return [];
}
// On old installations and never changed contacts this might not be filled
if (empty($contact['avatar'])) {
$contact['avatar'] = $contact['photo'];
}
$data = ['@context' => ActivityPub::CONTEXT];
$data['id'] = $contact['url'];
$data['diaspora:guid'] = $user['guid'];
@ -254,7 +249,7 @@ class Transmitter
'publicKeyPem' => $user['pubkey']];
$data['endpoints'] = ['sharedInbox' => System::baseUrl() . '/inbox'];
$data['icon'] = ['type' => 'Image',
'url' => $contact['avatar']];
'url' => $contact['photo']];
$data['generator'] = self::getService();