[buddypress-trac] [BuddyPress] #3980: bp_activity_at_name_filter_updates() causes activity to be saved twice

buddypress-trac noreply at wordpress.org
Tue Dec 18 00:18:33 UTC 2012

#3980: bp_activity_at_name_filter_updates() causes activity to be saved twice
 Reporter:  r-a-y                          |       Owner:
     Type:  defect (bug)                   |      Status:  closed
 Priority:  normal                         |   Milestone:  Future Release
Component:  Activity                       |     Version:  1.5
 Severity:  normal                         |  Resolution:  fixed
 Keywords:  dev-feedback has-patch commit  |
Changes (by r-a-y):

 * status:  new => closed
 * resolution:   => fixed


 (In [6649]) Only fire the activity save hooks once. Fixes #3980.

 Previously, bp_activity_at_name_filter_updates() would run the
 BP_Activity_Activity::save() method again.  So basically, all activity
 hooks would run twice; this caused problems for plugins that hooked into
 any activity save hook as their code would run twice.

 This commit changes the logic of how @mention activity items are linked
 sent so the activity save hooks are only run once.

 bp_activity_at_name_filter_updates() now runs before an activity item is
 saved and detects if @mentions are found.  If @mentions exists, we add a
 hook to send the emails after the activity item is saved -

 Hat-tip boonebgorges for feedback.

 For a full list of changes, view:

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3980#comment:15>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list