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 -N -r1.5 -r1.6 --- openacs-4/packages/notifications/tcl/sweep-procs.tcl 3 Jun 2002 22:27:00 -0000 1.5 +++ openacs-4/packages/notifications/tcl/sweep-procs.tcl 25 Jun 2002 18:58:06 -0000 1.6 @@ -15,26 +15,6 @@ } { } - ad_proc -public send_one { - {-user_id:required} - {-subject:required} - {-content:required} - {-response_id:required} - {-delivery_method_id:required} - } { - hack currently send only by email - # FIXME - } { - # Get email - set email [cc_email_from_party $user_id] - - acs_mail_lite::send \ - -to_addr $email \ - -from_addr "notifications@openforce.biz" \ - -subject $subject \ - -body $content - } - ad_proc -public cleanup_notifications {} { Clean up the notifications that are done } { @@ -64,10 +44,11 @@ if {!$batched_p} { db_transaction { # Send it - send_one -user_id [ns_set get $notif user_id] \ + notification::delivery::send -to_user_id [ns_set get $notif user_id] \ + -notification_type_id [ns_set get $notif type_id] \ -subject "\[[ad_system_name] - [ns_set get $notif object_name]\] [ns_set get $notif notif_subject]" \ -content [ns_set get $notif notif_text] \ - -response_id [ns_set get $notif response_id] \ + -reply_object_id [ns_set get $notif response_id] \ -delivery_method_id [ns_set get $notif delivery_method_id] # Markt it as sent @@ -77,7 +58,7 @@ } } else { # It's batched, we're not handling this one yet - ns_log Notice "Notifcations: Batched Request not handled" + ns_log Notice "Notifications: Batched Request not handled" } } }