From 55457810ba83a5b88b9a7b2ab64c213864d876ab Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 29 Jul 2014 15:38:44 -0400 Subject: [PATCH] FIX: Was not filtering correctly on the user's stream --- app/assets/javascripts/discourse/models/user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/models/user.js b/app/assets/javascripts/discourse/models/user.js index 99010adaf0e..dbc1d218bef 100644 --- a/app/assets/javascripts/discourse/models/user.js +++ b/app/assets/javascripts/discourse/models/user.js @@ -249,11 +249,11 @@ Discourse.User = Discourse.Model.extend({ @returns A stream of the user's actions containing the action of id **/ loadUserAction: function(id) { - var user = this; - var stream = this.get('stream'); + var self = this, + stream = this.get('stream'); return Discourse.ajax("/user_actions/" + id + ".json", { cache: 'false' }).then(function(result) { if (result) { - if ((user.get('streamFilter') || result.action_type) !== result.action_type) return; + if ((self.get('stream.filter') || result.action_type) !== result.action_type) return; var action = Discourse.UserAction.collapseStream([Discourse.UserAction.create(result)]); stream.set('itemsLoaded', stream.get('itemsLoaded') + 1); stream.get('content').insertAt(0, action[0]);