1
0
Fork 0

Store avatar cache fields only when needed

This commit is contained in:
Michael 2020-07-25 11:48:52 +00:00
commit 9b86f40a5f
8 changed files with 52 additions and 19 deletions

View file

@ -304,7 +304,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
*
* We will also update the contact record with the nature and scope of the relationship.
*/
Contact::updateAvatar($contact['photo'], $uid, $contact_id);
Contact::updateAvatar($contact_id, $contact['photo']);
Logger::log('dfrn_confirm: confirm - imported photos');
@ -484,7 +484,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
$photo = DI::baseUrl() . '/images/person-300.jpg';
}
Contact::updateAvatar($photo, $local_uid, $dfrn_record);
Contact::updateAvatar($dfrn_record, $photo);
Logger::log('dfrn_confirm: request - photos imported');

View file

@ -189,7 +189,7 @@ function dfrn_request_post(App $a)
Group::addMember(User::getDefaultGroup(local_user(), $r[0]["network"]), $r[0]['id']);
if (isset($photo)) {
Contact::updateAvatar($photo, local_user(), $r[0]["id"], true);
Contact::updateAvatar($r[0]["id"], $photo, true);
}
$forward_path = "contact/" . $r[0]['id'];
@ -420,7 +420,7 @@ function dfrn_request_post(App $a)
);
if (DBA::isResult($r)) {
$contact_record = $r[0];
Contact::updateAvatar($photo, $uid, $contact_record["id"], true);
Contact::updateAvatar($contact_record["id"], $photo, true);
}
}
}