activitypub xchans do not have an xchan_addr. use xchan_url for the follow button if we do not find an xchan_addr

This commit is contained in:
Mario Vavti 2018-04-30 14:33:35 +02:00
parent 875597cde1
commit 12c9e64463

View File

@ -127,7 +127,7 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') {
return replace_macros(get_markup_template('xchan_vcard.tpl'),array(
'$name' => $xchan['xchan_name'],
'$photo' => ((is_array(App::$profile) && array_key_exists('photo',App::$profile)) ? App::$profile['photo'] : $xchan['xchan_photo_l']),
'$follow' => $xchan['xchan_addr'],
'$follow' => (($xchan['xchan_addr']) ? $xchan['xchan_addr'] : $xchan['xchan_url']),
'$link' => zid($xchan['xchan_url']),
'$connect' => $connect,
'$newwin' => (($mode === 'chanview') ? t('New window') : ''),