[buddypress-trac] [BuddyPress] #4776: Allow email notifications to be hooked/filtered

buddypress-trac noreply at wordpress.org
Mon Jan 21 13:37:04 UTC 2013

#4776: Allow email notifications to be hooked/filtered
 Reporter:  cklosows       |      Owner:
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Notifications  |    Version:
 Severity:  normal         |   Keywords:  dev-feedback 2nd-opinion
 There's a use case I'm running into where I'd prefer to always send
 notifications via a push service.

 This service isn't email based and overloading wp_mail doesn't offer the
 ability to get details such as user_id, the exact details of the
 notification and the ability to overload the users preference.

 I'm looking for some feedback if something like this would be a viable
 option to have a user state they want to receive notifications, yet not
 send them via email.

 The goal in this change is:
 Be able to identify, prior to the email being sent, if the user wants to
 receive a notification and if so, execute this other notification service
 on the filter 'bp_activity_at_message_notification_preference'. This would
 allow me to gracefully degrade to sending the email if the user doesn't
 have the proper configuration for the 3rd party service (api key) or the
 service fails in general, by returning their preference unchanged. If
 however the service does succeed during the execution of that filter, I
 can return 'no', essentially leaving only the 1 notification instead of 2
 (email and service)

 If this is viable, I'd like to make these updates to each notification
 email function.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4776>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list