Skip to:
Content

BuddyPress.org

Ticket #4222: 4222.02.patch

File 4222.02.patch, 1.2 KB (added by DJPaul, 13 years ago)
  • bp-activity/bp-activity-filters.php

     
    230230                        continue;
    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                }
    236236
  • bp-activity/bp-activity-classes.php

     
    9191                if ( false === $wpdb->query( $q ) )
    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;
    9697
     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' );
     101
    97102                do_action_ref_array( 'bp_activity_after_save', array( &$this ) );
    98103
    99104                return true;