Index: openacs-4/packages/simulation/lib/messages.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/messages.tcl,v diff -u -r1.21.2.2 -r1.21.2.3 --- openacs-4/packages/simulation/lib/messages.tcl 31 Oct 2006 21:10:13 -0000 1.21.2.2 +++ openacs-4/packages/simulation/lib/messages.tcl 2 Nov 2006 07:17:10 -0000 1.21.2.3 @@ -176,7 +176,7 @@ "sm.to_role_id = :role_id or sm.from_role_id = :role_id"] )"] and [ad_decode $deleted_p 1 "" "not"] exists ( - select 1 from sim_trash st where st.message_id = sm.message_id) + select 1 from sim_messages_trash st where st.message_id = sm.message_id) and wc.case_id = sm.case_id and sc.sim_case_id = wc.object_id and w.workflow_id = wc.workflow_id