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.22 -r1.23 --- openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 24 Oct 2018 10:29:13 -0000 1.22 +++ openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 24 Oct 2018 11:05:08 -0000 1.23 @@ -59,7 +59,7 @@ {-uid ""} msg } { - if {![chat_room_exists_p [:chat_id]]} { + if {![chat_room_exists_p ${:chat_id}]} { return } @@ -72,7 +72,8 @@ # This way messages can be persisted immediately every time a # message is sent if {[:current_message_valid]} { - chat_message_post [:chat_id] [:user_id] $msg 1 + set uid [expr {$uid ne "" ? $uid : ${:user_id}}] + chat_message_post ${:chat_id} $uid $msg 1 } return $retval