diff --git src/bp-templates/bp-nouveau/js/buddypress-activity-post-form.js src/bp-templates/bp-nouveau/js/buddypress-activity-post-form.js
index 6f3038882..30214232b 100644
|
|
|
window.bp = window.bp || {}; |
| 708 | 708 | } |
| 709 | 709 | |
| 710 | 710 | bp.ajax.post( 'post_update', _.extend( data, this.model.attributes ) ).done( function( response ) { |
| 711 | | var scope = bp.Nouveau.getStorage( 'bp-activity', 'scope' ), |
| | 711 | var scope = bp.Nouveau.getStorage( 'bp-activity', 'scope' ), container, |
| 712 | 712 | prepended = false; |
| 713 | 713 | |
| | 714 | // It's the very first activity, let's make sure the container can welcome it! |
| | 715 | if ( response.is_directory && ! $( '#activity-stream ul.activity-list').length ) { |
| | 716 | container = $( '<ul></ul>').addClass( 'activity-list item-list bp-list' ); |
| | 717 | } |
| | 718 | |
| 714 | 719 | if ( ! response.is_directory || |
| 715 | 720 | ( 'all' === scope && ( 'user' === self.model.get( 'object' ) || false === response.is_private ) ) || |
| 716 | 721 | ( self.model.get( 'object' ) + 's' === scope ) |
| 717 | 722 | ) { |
| 718 | 723 | |
| 719 | 724 | if ( ! $( '#activity-' + response.id ).length ) { |
| | 725 | // Remove the initial feedback message. |
| | 726 | if ( container ) { |
| | 727 | $( '#activity-stream' ).html( container ); |
| | 728 | } |
| | 729 | |
| | 730 | // Prepend the activity into the container. |
| 720 | 731 | bp.Nouveau.inject( '#activity-stream ul.activity-list', response.activity, 'prepend' ); |
| 721 | 732 | prepended = true; |
| 722 | 733 | } |