Skip to:
Content

BuddyPress.org

Changeset 2500


Ignore:
Timestamp:
01/31/2010 02:52:24 PM (17 years ago)
Author:
apeatling
Message:

Fixes comment reply notification.

File:
1 edited

Legend:

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

    r2480 r2500  
    1717
    1818                // Now email the user with the contents of the message (if they have enabled email notifications)
    19                 if ( !get_usermeta( $user_id, 'notification_activity_new_mention' ) || 'yes' == get_usermeta( $user_id, 'notification_activity_new_mention' ) ) {
     19                if ( 'no' != get_usermeta( $user_id, 'notification_activity_new_mention' ) ) {
    2020                        $poster_name = bp_core_get_user_displayname( $poster_user_id );
    2121
    … …  
    4747add_action( 'bp_activity_posted_update', 'bp_activity_at_message_notification', 10, 3 );
    4848
    49 function bp_activity_new_comment_notification( $comment_id, $params ) {
     49function bp_activity_new_comment_notification( $comment_id, $commenter_id, $params ) {
    5050        global $bp;
    5151
    5252        extract( $params );
     53
    5354        $original_activity = new BP_Activity_Activity( $activity_id );
    5455
    5556        /* Don't email comments on a member's own activity */
    56         if ( $original_activity->user_id == $user_id )
     57        if ( $original_activity->user_id == $commenter_id )
    5758                return false;
    5859
    59         if ( !get_usermeta( $user_id, 'notification_activity_new_reply' ) || 'yes' == get_usermeta( $user_id, 'notification_activity_new_reply' ) ) {
    60                 $poster_name = bp_core_get_user_displayname( $user_id );
     60        if ( 'no' != get_usermeta( $original_activity->user_id, 'notification_activity_new_reply' ) ) {
     61                $poster_name = bp_core_get_user_displayname( $commenter_id );
    6162                $thread_link = bp_activity_get_permalink( $activity_id );
    6263                $settings_link = bp_core_get_user_domain( $original_activity->user_id ) . 'settings/notifications/';
Note: See TracChangeset for help on using the changeset viewer.