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.12.2.1 -r1.12.2.2 --- openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 20 Jun 2016 08:40:23 -0000 1.12.2.1 +++ openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 28 Oct 2016 18:57:36 -0000 1.12.2.2 @@ -8,8 +8,18 @@ } namespace eval ::chat { - ::xo::ChatClass Chat -superclass ::xo::Chat + ::xo::ChatClass Chat -superclass ::xo::Chat + Chat instproc init {} { + my instvar chat_id login_messages_p logout_messages_p + xo::dc 1row get_options " + select login_messages_p, + logout_messages_p + from chat_rooms + where room_id = :chat_id" + next + } + Chat instproc render {} { my orderby time set result "" @@ -57,8 +67,6 @@ // register the data sources (for sending messages, receiving updates) var pushMessage = registerDataConnection(pushReceiver, '$path/ajax/chat?m=get_new&$context', false); var pullUpdates = registerDataConnection(updateReceiver, '$path/ajax/chat?m=get_updates&$context', true); - // register an update function to refresh the data sources every 5 seconds - var updateInterval = setInterval(updateDataConnections,5000);