Index: openacs.org-dev/packages/notifications/tcl/sweep-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/notifications/tcl/sweep-procs-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs.org-dev/packages/notifications/tcl/sweep-procs-postgresql.xql 12 Feb 2003 13:18:07 -0000 1.2 +++ openacs.org-dev/packages/notifications/tcl/sweep-procs-postgresql.xql 4 Jul 2003 21:00:34 -0000 1.3 @@ -10,8 +10,9 @@ except select distinct notification_id from notifications inner join notification_requests using (type_id, object_id) + inner join acs_objects on (notification_requests.request_id = acs_objects.object_id) left outer join notification_user_map using (notification_id, user_id) - where sent_date is null + where sent_date is null and creation_date <= notif_date @@ -24,14 +25,16 @@ user_id, type_id, delivery_method_id, - response_id + response_id, + notif_date, + notif_user from notifications inner join notification_requests using (type_id, object_id) inner join acs_objects on (notification_requests.request_id = acs_objects.object_id) left outer join notification_user_map using (notification_id, user_id) where sent_date is null and creation_date <= notif_date and interval_id = :interval_id - order by user_id, type_id + order by user_id, type_id, notif_date