X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FAPContact.php;h=13add7e658939fdd92b9d6871eaf537aebe86c4b;hb=61484c3c4c5b02210e60130268e4529e12bfcde0;hp=d0a0d0d3f6b7eb4eea5045a5f9ddc7ca4f7544eb;hpb=f89cc6bd4548374bb797bf8d8365c6787be1845a;p=friendica.git diff --git a/src/Model/APContact.php b/src/Model/APContact.php index d0a0d0d3f6..13add7e658 100644 --- a/src/Model/APContact.php +++ b/src/Model/APContact.php @@ -239,6 +239,18 @@ class APContact $apcontact['about'] = HTML::toBBCode(JsonLD::fetchElement($compacted, 'as:summary', '@value')); + $ims = JsonLD::fetchElementArray($compacted, 'vcard:hasInstantMessage'); + if (!empty($ims)) { + foreach ($ims as $link) { + if (substr($link, 0, 5) == 'xmpp:') { + $apcontact['xmpp'] = substr($link, 5); + } + if (substr($link, 0, 7) == 'matrix:') { + $apcontact['matrix'] = substr($link, 7); + } + } + } + $apcontact['photo'] = JsonLD::fetchElement($compacted, 'as:icon', '@id'); if (is_array($apcontact['photo']) || !empty($compacted['as:icon']['as:url']['@id'])) { $apcontact['photo'] = JsonLD::fetchElement($compacted['as:icon'], 'as:url', '@id');