Merge pull request #11790 from annando/fetchactivity

Negative caching / config for receiver / fix fatals
This commit is contained in:
Hypolite Petovan 2022-07-28 17:29:34 -04:00 committed by GitHub
commit 5ec407699b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 7 deletions

View file

@ -352,11 +352,11 @@ class Photo extends BaseModule
}
if (empty($mimetext)) {
if ($customsize <= Proxy::PIXEL_MICRO) {
$url = Contact::getDefaultAvatar($contact, Proxy::SIZE_MICRO);
$url = Contact::getDefaultAvatar($contact ?: [], Proxy::SIZE_MICRO);
} elseif ($customsize <= Proxy::PIXEL_THUMB) {
$url = Contact::getDefaultAvatar($contact, Proxy::SIZE_THUMB);
$url = Contact::getDefaultAvatar($contact ?: [], Proxy::SIZE_THUMB);
} else {
$url = Contact::getDefaultAvatar($contact, Proxy::SIZE_SMALL);
$url = Contact::getDefaultAvatar($contact ?: [], Proxy::SIZE_SMALL);
}
}
return MPhoto::createPhotoForExternalResource($url, 0, $mimetext);