aboutsummaryrefslogtreecommitdiffstats
path: root/mod/chat.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-01 00:54:20 -0800
committerfriendica <info@friendica.com>2014-02-01 00:54:20 -0800
commitd14afc0ee442a2ba4013c193fa80917026bb6111 (patch)
tree48ba50be8f106acddfcf7ee874c003e07a7a766d /mod/chat.php
parent33f3cd3d4a5935422f5ef910390263c6928e5c57 (diff)
downloadvolse-hubzilla-d14afc0ee442a2ba4013c193fa80917026bb6111.tar.gz
volse-hubzilla-d14afc0ee442a2ba4013c193fa80917026bb6111.tar.bz2
volse-hubzilla-d14afc0ee442a2ba4013c193fa80917026bb6111.zip
provide the room name for the room you're in.
Diffstat (limited to 'mod/chat.php')
-rw-r--r--mod/chat.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/mod/chat.php b/mod/chat.php
index 54fa58092..612878cb2 100644
--- a/mod/chat.php
+++ b/mod/chat.php
@@ -101,8 +101,15 @@ function chat_content(&$a) {
$x = chatroom_enter($observer,$room_id,'online',$_SERVER['REMOTE_ADDR']);
if(! $x)
return;
+ $x = q("select * from chatroom where cr_id = %d and cr_uid = %d $sql_extra limit 1",
+ intval($room_id),
+ intval($a->profile['profile_uid'])
+ );
+ if($x) {
+ $room_name = $x[0]['cr_name'];
+ }
$o = replace_macros(get_markup_template('chat.tpl'),array(
- '$room_name' => '', // should we get this from the API?
+ '$room_name' => $room_name,
'$room_id' => $room_id,
'$submit' => t('Submit')
));