Always generate a random header if missing
This commit is contained in:
parent
df45a3b915
commit
10bdaa0cfe
|
@ -1668,8 +1668,8 @@ class Contact
|
||||||
*/
|
*/
|
||||||
public static function getDefaultHeader(array $contact): string
|
public static function getDefaultHeader(array $contact): string
|
||||||
{
|
{
|
||||||
if (!empty($contact['header']) || in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::TWITTER])) {
|
if (!empty($contact['header'])) {
|
||||||
return DI::baseUrl() . '/images/blank.png';
|
return $contact['header'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($contact['gsid'])) {
|
if (!empty($contact['gsid'])) {
|
||||||
|
@ -1702,7 +1702,7 @@ class Contact
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/**
|
/**
|
||||||
* Use random pictures for networks that don't provide banners.
|
* Use a random picture.
|
||||||
* The service provides random pictures from Unsplash.
|
* The service provides random pictures from Unsplash.
|
||||||
* @license https://unsplash.com/license
|
* @license https://unsplash.com/license
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue