mirror of
https://github.com/friendica/friendica
synced 2025-04-28 13:04:23 +02:00
The Matrix and XMPP address is now transported via AP as well
This commit is contained in:
parent
56ee1a211f
commit
ce46ab2573
6 changed files with 33 additions and 2 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue