aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-03-31 00:37:40 +0200
committerMario Vavti <mario@mariovavti.com>2016-03-31 00:37:40 +0200
commitdf891f4ad2eee3b07bad73d703a46364dad03508 (patch)
tree8b7e1aab334c78041bbdce5920e9184b7ea78b9a /mod
parent08461c7049ee5c9788e815537b540b9987a5eace (diff)
downloadvolse-hubzilla-df891f4ad2eee3b07bad73d703a46364dad03508.tar.gz
volse-hubzilla-df891f4ad2eee3b07bad73d703a46364dad03508.tar.bz2
volse-hubzilla-df891f4ad2eee3b07bad73d703a46364dad03508.zip
more work on mod chat
Diffstat (limited to 'mod')
-rw-r--r--mod/chat.php18
-rw-r--r--mod/chatsvc.php4
2 files changed, 17 insertions, 5 deletions
diff --git a/mod/chat.php b/mod/chat.php
index ecd94bd95..95b3802a8 100644
--- a/mod/chat.php
+++ b/mod/chat.php
@@ -161,6 +161,7 @@ function chat_content(&$a) {
intval($room_id),
intval($a->profile['profile_uid'])
);
+
if($x) {
$acl = new Zotlabs\Access\AccessList(false);
$acl->set($x[0]);
@@ -175,6 +176,11 @@ function chat_content(&$a) {
return;
}
+ $cipher = get_pconfig(local_channel(),'system','default_cipher');
+ if(! $cipher)
+ $cipher = 'aes256';
+
+
$o = replace_macros(get_markup_template('chat.tpl'),array(
'$is_owner' => ((local_channel() && local_channel() == $x[0]['cr_uid']) ? true : false),
'$room_name' => $room_name,
@@ -183,12 +189,16 @@ function chat_content(&$a) {
'$nickname' => argv(1),
'$submit' => t('Submit'),
'$leave' => t('Leave Room'),
- '$drop' => t('Delete This Room'),
+ '$drop' => t('Delete Room'),
'$away' => t('I am away right now'),
'$online' => t('I am online'),
'$bookmark_link' => $bookmark_link,
- '$bookmark' => t('Bookmark this room')
-
+ '$bookmark' => t('Bookmark this room'),
+ '$feature_encrypt' => ((feature_enabled(local_channel(),'content_encrypt')) ? true : false),
+ '$cipher' => $cipher,
+ '$linkurl' => t('Please enter a link URL:'),
+ '$encrypt' => t('Encrypt text'),
+ '$insert' => t('Insert web link')
));
return $o;
}
@@ -229,7 +239,7 @@ function chat_content(&$a) {
'$norooms' => t('No chatrooms available'),
'$newroom' => t('Create New'),
'$is_owner' => ((local_channel() && local_channel() == $a->profile['profile_uid']) ? 1 : 0),
- '$chatroom_new' => $chatroom_new
+ '$chatroom_new' => $chatroom_new,
));
return $o;
diff --git a/mod/chatsvc.php b/mod/chatsvc.php
index 44225e6dd..829fef6f8 100644
--- a/mod/chatsvc.php
+++ b/mod/chatsvc.php
@@ -109,14 +109,16 @@ function chatsvc_content(&$a) {
switch($rr['cp_status']) {
case 'away':
$status = t('Away');
+ $status_class = 'away';
break;
case 'online':
default:
$status = t('Online');
+ $status_class = 'online';
break;
}
- $inroom[] = array('img' => zid($rr['xchan_photo_m']), 'img_type' => $rr['xchan_photo_mimetype'],'name' => $rr['xchan_name'], status => $status);
+ $inroom[] = array('img' => zid($rr['xchan_photo_m']), 'img_type' => $rr['xchan_photo_mimetype'],'name' => $rr['xchan_name'], 'status' => $status, 'status_class' => $status_class);
}
}