Index: openacs-4/packages/chat/www/chat.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/chat.tcl,v diff -u -N -r1.17 -r1.18 --- openacs-4/packages/chat/www/chat.tcl 7 Aug 2017 23:48:07 -0000 1.17 +++ openacs-4/packages/chat/www/chat.tcl 28 Sep 2018 11:44:23 -0000 1.18 @@ -8,8 +8,6 @@ @cvs-id $Id$ } { room_id:naturalnum,notnull - {client "ajax"} - {message:html ""} } -properties { context:onevalue user_id:onevalue @@ -55,24 +53,8 @@ ad_script_abort } -# Get chat screen name. -set user_name [chat_user_name $user_id] +template::head::add_css -href resources/chat.css -# Determine which template to use for html or ajax client -switch $client { - "html" { - set template_use "html-chat" - # forward to ajax if necessary - if { $message ne "" } { - set session_id [ad_conn session_id] - ::chat::Chat c1 -volatile -chat_id $room_id -session_id $session_id - c1 add_msg $message - } - } - "ajax" { - set template_use "ajax-chat-script" - } -} - -ad_return_template $template_use - +set chat_frame [::chat::Chat login \ + -package_id [ad_conn package_id] \ + -chat_id $room_id]