make chatrooms in /chat/channel visible to observers aswell
This commit is contained in:
parent
e47035f85a
commit
e06d9e97c5
@ -173,8 +173,10 @@ function chatroom_leave($observer_xchan,$room_id,$client) {
|
|||||||
|
|
||||||
|
|
||||||
function chatroom_list($uid) {
|
function chatroom_list($uid) {
|
||||||
|
require_once('include/security.php');
|
||||||
|
$sql_extra = permissions_sql($uid);
|
||||||
|
|
||||||
$r = q("select cr_name, cr_id, count(cp_id) as cr_inroom from chatroom left join chatpresence on cr_id = cp_room where cr_uid = %d group by cr_name order by cr_name",
|
$r = q("select cr_name, cr_id, count(cp_id) as cr_inroom from chatroom left join chatpresence on cr_id = cp_room where cr_uid = %d $sql_extra group by cr_name order by cr_name",
|
||||||
intval($uid)
|
intval($uid)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -578,13 +578,16 @@ function widget_menu_preview($arr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function widget_chatroom_list($arr) {
|
function widget_chatroom_list($arr) {
|
||||||
|
|
||||||
|
$a = get_app();
|
||||||
|
|
||||||
require_once("include/chat.php");
|
require_once("include/chat.php");
|
||||||
$r = chatroom_list(local_user());
|
$r = chatroom_list($a->profile['profile_uid']);
|
||||||
$channel = get_app()->get_channel();
|
|
||||||
return replace_macros(get_markup_template('chatroomlist.tpl'),array(
|
return replace_macros(get_markup_template('chatroomlist.tpl'),array(
|
||||||
'$header' => t('Chat Rooms'),
|
'$header' => t('Chat Rooms'),
|
||||||
'$baseurl' => z_root(),
|
'$baseurl' => z_root(),
|
||||||
'$nickname' => $channel['channel_address'],
|
'$nickname' => $a->profile['channel_address'],
|
||||||
'$items' => $r,
|
'$items' => $r,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user