xo::db::chat_room instproc transcript_messages (public)
<instance of xo::db::chat_room> transcript_messages
Defined in /var/www/openacs.org/packages/chat/tcl/xotcl-chat-procs.tcl
Formats the current content of a chat room as a list of messages formatted so they can be displayed or stored in the transcript.
- Returns:
- list of formatted messages
- Testcases:
- No testcase defined.
Source code: set room_id ${:room_id} set contents [list] ::xo::dc foreach get_archives_messages { select msg, creation_user, to_char(creation_date, 'DD.MM.YYYY hh24:mi:ss') as creation_date from chat_msgs where room_id = :room_id and msg is not null order by creation_date } { if {$creation_user > 0} { set user_name [::chat::Package get_user_name -user_id $creation_user] if {$user_name eq ""} { set user_name Unknown } } else { set user_name "system" } lappend contents "\[$creation_date\] ${user_name}: $msg" } return $contentsXQL Not present: Generic, PostgreSQL, Oracle