diff options
author | friendica <info@friendica.com> | 2014-01-29 01:52:23 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-01-29 01:52:23 -0800 |
commit | 9f546757021305b6cfe924f38ca1af5fd5d3e69b (patch) | |
tree | 8d1f65d69c1c02665deeec35c009b87ad902ab6e /include/chat.php | |
parent | 9261a170eb45f0b189afb4c1a30603d0cbb8f31c (diff) | |
download | volse-hubzilla-9f546757021305b6cfe924f38ca1af5fd5d3e69b.tar.gz volse-hubzilla-9f546757021305b6cfe924f38ca1af5fd5d3e69b.tar.bz2 volse-hubzilla-9f546757021305b6cfe924f38ca1af5fd5d3e69b.zip |
chatroom list widget backend
Diffstat (limited to 'include/chat.php')
-rw-r--r-- | include/chat.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/chat.php b/include/chat.php index 4df419294..cb910bd62 100644 --- a/include/chat.php +++ b/include/chat.php @@ -114,4 +114,13 @@ function chatroom_leave($observer_xchan,$room_id,$status) { ); } return true; +} + + +function chatroom_list($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 order by cr_name group by cp_id", + intval($uid) + ); + return $r; }
\ No newline at end of file |