Index: openacs-4/packages/chat/tcl/chat-ajax-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/chat-ajax-procs.tcl,v diff -u -N -r1.27 -r1.28 --- openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 21 Nov 2018 09:56:37 -0000 1.27 +++ openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 21 Nov 2018 12:32:18 -0000 1.28 @@ -37,14 +37,7 @@ return [_ chat.Room_not_found] } else { chat_room_get -room_id $chat_id -array c - next \ - -chat_id $chat_id \ - -package_id $c(context_id) \ - -mode $mode \ - -path $path \ - -login_messages_p $c(login_messages_p) \ - -logout_messages_p $c(logout_messages_p) \ - -timewindow $c(messages_time_window) + next -chat_id $chat_id -package_id $c(context_id) -mode $mode -path $path } } @@ -66,6 +59,12 @@ ad_return_forbidden ad_script_abort } + if {[chat_room_exists_p ${:chat_id}]} { + chat_room_get -room_id ${:chat_id} -array c + set :login_messages_p $c(login_messages_p) + set :logout_messages_p $c(logout_messages_p) + set :timewindow $c(messages_time_window) + } next } Index: openacs-4/packages/xowiki/tcl/chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/chat-procs.tcl,v diff -u -N -r1.48 -r1.49 --- openacs-4/packages/xowiki/tcl/chat-procs.tcl 21 Nov 2018 11:20:31 -0000 1.48 +++ openacs-4/packages/xowiki/tcl/chat-procs.tcl 21 Nov 2018 12:32:18 -0000 1.49 @@ -408,9 +408,6 @@ {-package_id ""} {-mode ""} {-path ""} - -login_messages_p - -logout_messages_p - -timewindow } { #:log "--chat" if {![ns_conn isconnected]} return @@ -524,22 +521,11 @@ }] - set chat_cmd [list \ - [self] create c1 \ - -destroy_on_cleanup \ - -chat_id $chat_id \ - -session_id $session_id \ - -mode $mode] - # We don't want to override Chat class default with our own and - # therefore we build the command dynamically depending if these - # variables are there or not. - set optional_vars [list login_messages_p logout_messages_p timewindow] - foreach var $optional_vars { - if {[info exists $var]} { - lappend chat_cmd -${var} [set $var] - } - } - {*}$chat_cmd + [self] create c1 \ + -destroy_on_cleanup \ + -chat_id $chat_id \ + -session_id $session_id \ + -mode $mode set data [c1 login] if {$data ne ""} { Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -N -r1.234 -r1.235 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 21 Nov 2018 09:56:37 -0000 1.234 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 21 Nov 2018 12:32:18 -0000 1.235 @@ -4665,9 +4665,6 @@ {-chat_id ""} {-mode ""} {-path ""} - -login_messages_p - -logout_messages_p - -timewindow }} } chat instproc render {} { @@ -4676,21 +4673,10 @@ # make the chat just for including page set chat_id [${:__including_page} item_id] } - set chat_cmd [list \ - ::xowiki::Chat login \ - -chat_id $chat_id \ - -mode $mode \ - -path $path] - # We don't want to override Chat class default with our own and - # therefore we build the command dynamically depending if these - # variables are there or not. - set optional_vars [list login_messages_p logout_messages_p timewindow] - foreach var $optional_vars { - if {[info exists $var]} { - lappend chat_cmd -${var} [set $var] - } - } - set r [{*}$chat_cmd] + set r [::xowiki::Chat login \ + -chat_id $chat_id \ + -mode $mode \ + -path $path] #ns_log notice chat=>$r