aboutsummaryrefslogtreecommitdiffstats
path: root/include/chat.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-20 16:22:21 -0700
committerfriendica <info@friendica.com>2014-09-20 16:22:21 -0700
commit44cb423f21b6a34a138e7ffd2814fdd08788cfbe (patch)
treebbd84e79b59b3e6ccd848758a65aeae9033d37fa /include/chat.php
parent8d23a8da8dd7326d6ce9c3a64f96e5325a09d4a1 (diff)
parenta1773fea2529e6e3b1dcc816e948dacb4a250705 (diff)
downloadvolse-hubzilla-44cb423f21b6a34a138e7ffd2814fdd08788cfbe.tar.gz
volse-hubzilla-44cb423f21b6a34a138e7ffd2814fdd08788cfbe.tar.bz2
volse-hubzilla-44cb423f21b6a34a138e7ffd2814fdd08788cfbe.zip
Merge https://github.com/friendica/red into pending_merge
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.