kopia lustrzana https://github.com/nextcloud/social
rodzic
5236dd4ae8
commit
d207a22f33
appinfo
lib/Service
|
@ -82,7 +82,7 @@ return [
|
|||
['name' => 'Local#globalActorAvatar', 'url' => '/api/v1/global/actor/avatar', 'verb' => 'GET'],
|
||||
['name' => 'Local#globalAccountsSearch', 'url' => '/api/v1/global/accounts/search', 'verb' => 'GET'],
|
||||
|
||||
['name' => 'Local#documentsCache', 'url' => '/api/v1/documents/cache', 'verb' => 'POST'],
|
||||
// ['name' => 'Local#documentsCache', 'url' => '/api/v1/documents/cache', 'verb' => 'POST'],
|
||||
|
||||
['name' => 'Queue#asyncWithToken', 'url' => CurlService::ASYNC_TOKEN, 'verb' => 'POST'],
|
||||
|
||||
|
|
|
@ -143,12 +143,10 @@ class ActorService {
|
|||
*/
|
||||
private function cacheDocumentIfNeeded(Person $actor) {
|
||||
if ($actor->gotIcon()) {
|
||||
$icon = $actor->getIcon();
|
||||
try {
|
||||
$icon = $this->cacheDocumentsRequest->getBySource(
|
||||
$actor->getIcon()
|
||||
->getUrl()
|
||||
);
|
||||
$actor->setIcon($icon);
|
||||
$cache = $this->cacheDocumentsRequest->getByUrl($icon->getUrl());
|
||||
$actor->setIcon($cache);
|
||||
} catch (CacheDocumentDoesNotExistException $e) {
|
||||
$this->cacheDocumentsRequest->save($actor->getIcon());
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue