aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Connections.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-20 23:26:31 -0800
committerzotlabs <mike@macgirvin.com>2016-12-20 23:26:31 -0800
commit3d811a17feb9b3d0fd4dc09023e3b7b5fe1623ac (patch)
treebf33cc99db4ce8e8048a5c6c1a8682d26d267a28 /Zotlabs/Module/Connections.php
parentf3ec818a66e7909bcb744868cfef43c3481c4e43 (diff)
downloadvolse-hubzilla-3d811a17feb9b3d0fd4dc09023e3b7b5fe1623ac.tar.gz
volse-hubzilla-3d811a17feb9b3d0fd4dc09023e3b7b5fe1623ac.tar.bz2
volse-hubzilla-3d811a17feb9b3d0fd4dc09023e3b7b5fe1623ac.zip
provide call button on connections list if mobile|tablet and a phone number exists
Diffstat (limited to 'Zotlabs/Module/Connections.php')
-rw-r--r--Zotlabs/Module/Connections.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/Zotlabs/Module/Connections.php b/Zotlabs/Module/Connections.php
index a0375cebb..950be660d 100644
--- a/Zotlabs/Module/Connections.php
+++ b/Zotlabs/Module/Connections.php
@@ -229,9 +229,17 @@ class Connections extends \Zotlabs\Web\Controller {
$contacts = array();
if($r) {
-
+
+ vcard_query($r);
+
+
foreach($r as $rr) {
if($rr['xchan_url']) {
+
+ if(($rr['vcard']) && is_array($rr['vcard']['tels']) && $rr['vcard']['tels'][0]['nr'])
+ $phone = ((\App::$is_mobile || \App::$is_tablet) ? $rr['vcard']['tels'][0]['nr'] : '');
+ else
+ $phone = '';
$status_str = '';
$status = array(
@@ -267,6 +275,8 @@ class Connections extends \Zotlabs\Web\Controller {
'network_label' => t('Network'),
'network' => network_to_name($rr['xchan_network']),
'public_forum' => ((intval($rr['xchan_pubforum'])) ? true : false),
+ 'call' => t('Call'),
+ 'phone' => $phone,
'status_label' => t('Status'),
'status' => $status_str,
'connected_label' => t('Connected'),