diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-03-08 09:39:46 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-08 09:39:46 +0100 |
commit | bc2b948f1f6e62b1c277a4042200bb6678956f3f (patch) | |
tree | 8586c30e495607eee23f16c0aad40974f0711275 /Zotlabs/Module/Chatsvc.php | |
parent | 23e3e2c50499fab52769929a448e73012fd915af (diff) | |
parent | ff9442474d07cce24c8f66db39ec34471c3874a2 (diff) | |
download | volse-hubzilla-2.2.tar.gz volse-hubzilla-2.2.tar.bz2 volse-hubzilla-2.2.zip |
Merge branch 2.2RC2.2
Diffstat (limited to 'Zotlabs/Module/Chatsvc.php')
-rw-r--r-- | Zotlabs/Module/Chatsvc.php | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/Zotlabs/Module/Chatsvc.php b/Zotlabs/Module/Chatsvc.php index 6a28a7c4d..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); } } @@ -143,7 +157,7 @@ class Chatsvc extends \Zotlabs\Web\Controller { 'name' => $rr['xchan_name'], 'isotime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'c'), 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'r'), - 'text' => smilies(bbcode($rr['chat_text'])), + 'text' => zidify_links(smilies(bbcode($rr['chat_text']))), 'self' => ((get_observer_hash() == $rr['chat_xchan']) ? 'self' : '') ); } |