Browse Source
Show IMPP URL if there is one
Allows a contact to list an alternate chat address or JabberID at which they can
be reached.
pull/1181/head
Stephen Paul Weber
3 years ago
No known key found for this signature in database
GPG Key ID: D11C2911CE519CDE
2 changed files with
8 additions and
1 deletions
-
app/Contact.php
-
app/widgets/ContactData/_contactdata_card.tpl
|
|
@ -230,6 +230,10 @@ class Contact extends Model |
|
|
|
? (string)$vcard->url->uri |
|
|
|
: null; |
|
|
|
|
|
|
|
if ($this->url == null && $vcard->impp->uri) { |
|
|
|
$this->url = $vcard->impp->uri; |
|
|
|
} |
|
|
|
|
|
|
|
$this->adrlocality = !empty($vcard->adr->locality) |
|
|
|
? (string)$vcard->adr->locality |
|
|
|
: null; |
|
|
|
|
|
@ -64,7 +64,10 @@ |
|
|
|
|
|
|
|
{if="$contact->url != null"} |
|
|
|
<i class="material-icons icon-text">link</i> |
|
|
|
{if="filter_var($contact->url, FILTER_VALIDATE_URL)"} |
|
|
|
{if="parse_url($contact->url, PHP_URL_SCHEME) == 'xmpp'"} |
|
|
|
|
|
|
|
<a href="{$contact->url}" onclick="MovimUtils.reload('{$c->route('contact', substr($contact->url, 5))}'); return false" rel="me">{$contact->url}</a> |
|
|
|
{elseif="filter_var($contact->url, FILTER_VALIDATE_URL)"} |
|
|
|
<a href="{$contact->url}" target="_blank" rel="me">{$contact->url}</a> |
|
|
|
{else} |
|
|
|
{$contact->url} |
|
|
|