Skip to:
Content

BuddyPress.org

Changeset 6167


Ignore:
Timestamp:
07/04/2012 06:21:14 PM (10 years ago)
Author:
djpaul
Message:

Prevent @mention notifications being re-sent when a comment is edited. This also affects
activity items that are modified through the Activity Management screens. Fixes #4222

Location:
trunk/bp-activity
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-classes.php

    r6131 r6167  
    9292            return false;
    9393
     94        // If this is a new activity item, set the $id property
    9495        if ( empty( $this->id ) )
    9596            $this->id = $wpdb->insert_id;
     97
     98        // If an existing activity item, prevent any changes to the content generating new @mention notifications.
     99        else
     100            add_filter( 'bp_activity_at_name_do_notifications', '__return_false' );
    96101
    97102        do_action_ref_array( 'bp_activity_after_save', array( &$this ) );
  • trunk/bp-activity/bp-activity-filters.php

    r6127 r6167  
    231231
    232232        // If an activity_id is provided, we can send email and BP notifications
    233         if ( $activity_id ) {
     233        if ( $activity_id && apply_filters( 'bp_activity_at_name_do_notifications', true ) ) {
    234234            bp_activity_at_message_notification( $activity_id, $user_id );
    235235        }
Note: See TracChangeset for help on using the changeset viewer.