Index: openacs-4/packages/notifications/tcl/sweep-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/notifications/tcl/sweep-procs.tcl 27 Jun 2007 18:54:48 -0000 1.22 +++ openacs-4/packages/notifications/tcl/sweep-procs.tcl 31 Mar 2010 20:35:27 -0000 1.23 @@ -17,6 +17,11 @@ # Also sweep the dynamic notification requests that have been sent out db_dml delete_dynamic_requests {} + # before the killing starts, remove invalid requests + foreach request_id [db_list select_invalid_request_ids {}] { + notification::request::delete -request_id $request_id + } + # Get the list of the ones to kill set notification_id_list [db_list select_notification_ids {}] Index: openacs-4/packages/notifications/tcl/sweep-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/notifications/tcl/sweep-procs.xql 25 Feb 2003 10:07:13 -0000 1.1 +++ openacs-4/packages/notifications/tcl/sweep-procs.xql 31 Mar 2010 20:35:27 -0000 1.2 @@ -16,4 +16,15 @@ + + + select request_id + from notification_requests + where not exists (select 1 from acs_object_party_privilege_map ppm + where ppm.object_id = notification_requests.object_id + and ppm.privilege = 'read' + and ppm.party_id = notification_requests.user_id); + + +