*/
public static function getDefaultHeader(array $contact): string
{
- if (!empty($contact['header']) || in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::TWITTER])) {
- return DI::baseUrl() . '/images/blank.png';
+ if (!empty($contact['header'])) {
+ return $contact['header'];
}
if (!empty($contact['gsid'])) {
break;
default:
/**
- * Use random pictures for networks that don't provide banners.
+ * Use a random picture.
* The service provides random pictures from Unsplash.
* @license https://unsplash.com/license
*/
// These fields aren't updated by this routine:
// 'sensitive'
- $fields = ['uid', 'uri-id', 'gsid', 'avatar', 'header', 'name', 'nick', 'location', 'keywords', 'about', 'subscribe',
+ $fields = ['uid', 'uri-id', 'avatar', 'header', 'name', 'nick', 'location', 'keywords', 'about', 'subscribe',
'manually-approve', 'unsearchable', 'url', 'addr', 'batch', 'notify', 'poll', 'request', 'confirm', 'poco',
'network', 'alias', 'baseurl', 'gsid', 'forum', 'prv', 'contact-type', 'pubkey', 'last-item', 'xmpp', 'matrix'];
$contact = DBA::selectFirst('contact', $fields, ['id' => $id]);
$uriid = $contact['uri-id'];
unset($contact['uri-id']);
- $gsid = $contact['gsid'];
- unset($contact['gsid']);
-
$pubkey = $contact['pubkey'];
unset($contact['pubkey']);