aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/chatsvc.php12
-rw-r--r--view/tpl/chat.tpl2
2 files changed, 12 insertions, 2 deletions
diff --git a/mod/chatsvc.php b/mod/chatsvc.php
index f32ea56ce..0a69834f0 100644
--- a/mod/chatsvc.php
+++ b/mod/chatsvc.php
@@ -85,7 +85,17 @@ function chatsvc_content(&$a) {
);
if($r) {
foreach($r as $rr) {
- $inroom[] = array('img' => zid($rr['xchan_photo_m']), 'img_type' => $rr['xchan_photo_mimetype'],'name' => $rr['xchan_name']);
+ switch($rr['cp_status']) {
+ case 'away':
+ $status = t('Away');
+ break;
+ case 'online':
+ default:
+ $status = t('Online');
+ break;
+ }
+
+ $inroom[] = array('img' => zid($rr['xchan_photo_m']), 'img_type' => $rr['xchan_photo_mimetype'],'name' => $rr['xchan_name'], status => $status);
}
}
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
index eda1f83af..0ebe879a1 100644
--- a/view/tpl/chat.tpl
+++ b/view/tpl/chat.tpl
@@ -66,7 +66,7 @@ function update_inroom(inroom) {
var count = inroom.length;
$.each( inroom, function(index, item) {
var newNode = document.createElement('div');
- $(newNode).html('<img style="height: 32px; width: 32px;" src="' + item.img + '" alt="' + item.name + '" /><br />' + item.name + '<br/>');
+ $(newNode).html('<img style="height: 32px; width: 32px;" src="' + item.img + '" alt="' + item.name + '" /> ' + item.status + '<br />' + item.name + '<br/>');
html.appendChild(newNode);
});
$('#chatUsers').html(html);