aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Chatsvc.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-02 23:35:40 -0800
committerzotlabs <mike@macgirvin.com>2017-01-02 23:35:40 -0800
commitae563e2b1cfdc0ade6cc7cf3843e8ba92f2e10bf (patch)
tree4445a16f19b72eda82f160f9894210bb2c037209 /Zotlabs/Module/Chatsvc.php
parent1ceca4ae194fe611f93f70bcf2a6222c8badd3dc (diff)
downloadvolse-hubzilla-ae563e2b1cfdc0ade6cc7cf3843e8ba92f2e10bf.tar.gz
volse-hubzilla-ae563e2b1cfdc0ade6cc7cf3843e8ba92f2e10bf.tar.bz2
volse-hubzilla-ae563e2b1cfdc0ade6cc7cf3843e8ba92f2e10bf.zip
fix chat member list when one or members are connected via access tokens
Diffstat (limited to 'Zotlabs/Module/Chatsvc.php')
-rw-r--r--Zotlabs/Module/Chatsvc.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/Zotlabs/Module/Chatsvc.php b/Zotlabs/Module/Chatsvc.php
index b24b15317..0f79e3b4c 100644
--- a/Zotlabs/Module/Chatsvc.php
+++ b/Zotlabs/Module/Chatsvc.php
@@ -111,8 +111,22 @@ class Chatsvc extends \Zotlabs\Web\Controller {
intval(\App::$data['chat']['room_id'])
);
if($r) {
- foreach($r as $rr) {
- switch($rr['cp_status']) {
+ foreach($r as $rv) {
+ if(! $rv['xchan_name']) {
+ $rv['xchan_hash'] = $rv['cp_xchan'];
+ $rv['xchan_name'] = substr($rv['cp_xchan'],strrpos($rv['cp_xchan'],'.')+1);
+ $rv['xchan_addr'] = '';
+ $rv['xchan_network'] = 'unknown';
+ $rv['xchan_url'] = z_root();
+ $rv['xchan_hidden'] = 1;
+ $rv['xchan_photo_mimetype'] = 'image/jpeg';
+ $rv['xchan_photo_l'] = get_default_profile_photo(300);
+ $rv['xchan_photo_m'] = get_default_profile_photo(80);
+ $rv['xchan_photo_s'] = get_default_profile_photo(48);
+
+ }
+
+ switch($rv['cp_status']) {
case 'away':
$status = t('Away');
$status_class = 'away';
@@ -124,7 +138,7 @@ class Chatsvc extends \Zotlabs\Web\Controller {
break;
}
- $inroom[] = array('img' => zid($rr['xchan_photo_m']), 'img_type' => $rr['xchan_photo_mimetype'],'name' => $rr['xchan_name'], 'status' => $status, 'status_class' => $status_class);
+ $inroom[] = array('img' => zid($rv['xchan_photo_m']), 'img_type' => $rv['xchan_photo_mimetype'],'name' => $rv['xchan_name'], 'status' => $status, 'status_class' => $status_class);
}
}