Skip to:
Content

bbPress.org


Ignore:
Timestamp:
04/23/2018 05:05:30 AM (8 years ago)
Author:
johnjamesjacoby
Message:

BuddyPress: tweak notifications item IDs to provide a bit more context.

This change also fixes a bug with hierarchical reply notifications.

Props jpolakovic. Fixes #2834.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/extend/buddypress/notifications.php

    r6777 r6815  
    153153    );
    154154
    155     // Notify the topic author if not the current reply author
    156     if ( $author_id !== $topic_author_id ) {
     155    // Notify the topic author if not the current reply author
     156    if ( $author_id !== $topic_author_id ) {
    157157        $args['secondary_item_id'] = $secondary_item_id ;
    158158
    159159        bp_notifications_add_notification( $args );
    160     }
    161 
    162     // Notify the immediate reply author if not the current reply author
    163     if ( ! empty( $reply_to ) && ( $author_id !== $reply_to_item_id ) ) {
    164         $args['secondary_item_id'] = $reply_to_item_id ;
     160    }
     161
     162    // Notify the immediate reply author if not the current reply author
     163    if ( ! empty( $reply_to ) && ( $author_id !== $reply_to_item_id ) ) {
     164        $args['user_id']           = $reply_to_item_id;
     165        $args['secondary_item_id'] = $topic_author_id;
    165166
    166167        bp_notifications_add_notification( $args );
    167     }
     168    }
    168169}
    169170
Note: See TracChangeset for help on using the changeset viewer.