// Update the gcontact entry
if ($uid == 0) {
GContact::updateFromPublicContactID($contact_id);
+ if (($data['network'] == Protocol::ACTIVITYPUB) && in_array(DI::config()->get('system', 'gcontact_discovery'), [GContact::DISCOVERY_DIRECT, GContact::DISCOVERY_RECURSIVE])) {
+ GContact::discoverFollowers($data['url']);
+ }
}
}
} else {
* @param int $cid Contact id
* @param bool $force force picture update
*
- * @return array Returns array of the different avatar sizes
+ * @return void
* @throws HTTPException\InternalServerErrorException
* @throws HTTPException\NotFoundException
* @throws \ImagickException
{
$contact = DBA::selectFirst('contact', ['avatar', 'photo', 'thumb', 'micro', 'nurl'], ['id' => $cid, 'self' => false]);
if (!DBA::isResult($contact)) {
- Logger::error('Contact not found', ['cid' => $cid]);
- throw new HTTPException\NotFoundException('Contact not found');
+ return;
}
$data = [
DBA::update('contact', $fields, ['id' => $pcontact['id']]);
}
}
-
- return $photos;
}
}
-
- return $data;
}
/**