aboutsummaryrefslogtreecommitdiffstats
path: root/include/chat.php
diff options
context:
space:
mode:
authorPaolo Tacconi <p.tacconi@giunti.it>2014-09-25 08:44:07 +0200
committerPaolo Tacconi <p.tacconi@giunti.it>2014-09-25 08:44:07 +0200
commit6324a07dd8b17db5da0ce66c99fb69e2f3ec49e1 (patch)
tree89e81409add34df97f633515181790d6aed4c726 /include/chat.php
parent7da97c198182f8f6f4286e16d80de205431d81bb (diff)
parent92c723d37cd8ded2183d3334eb51e740170e191b (diff)
downloadvolse-hubzilla-6324a07dd8b17db5da0ce66c99fb69e2f3ec49e1.tar.gz
volse-hubzilla-6324a07dd8b17db5da0ce66c99fb69e2f3ec49e1.tar.bz2
volse-hubzilla-6324a07dd8b17db5da0ce66c99fb69e2f3ec49e1.zip
Rebase from upstream
Diffstat (limited to 'include/chat.php')
-rw-r--r--include/chat.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/chat.php b/include/chat.php
index b8fb185df..5c3d0c9d9 100644
--- a/include/chat.php
+++ b/include/chat.php
@@ -189,6 +189,17 @@ function chatroom_list($uid) {
return $r;
}
+function chatroom_list_count($uid) {
+ require_once('include/security.php');
+ $sql_extra = permissions_sql($uid);
+
+ $r = q("select count(*) as total from chatroom where cr_uid = %d $sql_extra",
+ intval($uid)
+ );
+
+ return $r[0]['total'];
+}
+
/**
* create a chat message via API.
* It is the caller's responsibility to enter the room.