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 -r1.23 -r1.24 --- openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 24 Oct 2018 11:05:08 -0000 1.23 +++ openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 19 Nov 2018 14:32:29 -0000 1.24 @@ -7,11 +7,36 @@ @cvs-id $Id$ } +namespace eval ::xowiki::includelet { + + ::xowiki::IncludeletClass create chat_room \ + -superclass ::xowiki::Includelet \ + -parameter { + {parameter_declaration { + {-chat_id} + {-mode:optional ""} + {-path:optional ""} + }} + } + + chat_room instproc render {} { + :get_parameters + template::head::add_css -href /chat/resources/chat.css + return [::chat::Chat login \ + -chat_id $chat_id \ + -mode $mode \ + -path $path] + } + +} + namespace eval ::chat { ::xo::ChatClass Chat -superclass ::xowiki::Chat Chat proc login {-chat_id {-package_id ""} {-mode ""} {-path ""}} { - if {$package_id eq "" && [chat_room_exists_p $chat_id]} { + if {![chat_room_exists_p $chat_id]} { + return [_ chat.Room_not_found] + } else { chat_room_get -room_id $chat_id -array c set package_id $c(context_id) } Index: openacs-4/packages/chat/www/chat.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/chat.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/chat/www/chat.tcl 24 Oct 2018 10:29:13 -0000 1.20 +++ openacs-4/packages/chat/www/chat.tcl 19 Nov 2018 14:32:29 -0000 1.21 @@ -56,7 +56,7 @@ template::head::add_css -href resources/chat.css set chat_frame [::chat::Chat login \ - -chat_id $room_id] + -chat_id $room_id] # Local variables: # mode: tcl 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 -r1.232 -r1.233 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 19 Nov 2018 11:15:07 -0000 1.232 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 19 Nov 2018 14:32:29 -0000 1.233 @@ -4665,7 +4665,6 @@ {-chat_id ""} {-mode ""} {-path ""} - {-package_id ""} }} } chat instproc render {} { @@ -4674,7 +4673,7 @@ # make the chat just for including page set chat_id [${:__including_page} item_id] } - set r [::xowiki::Chat login -chat_id $chat_id -mode $mode -path $path -package_id $package_id] + set r [::xowiki::Chat login -chat_id $chat_id -mode $mode -path $path] #ns_log notice chat=>$r return $r