FIX: Was not filtering correctly on the user's stream
This commit is contained in:
parent
7cc4a157f6
commit
55457810ba
|
@ -249,11 +249,11 @@ Discourse.User = Discourse.Model.extend({
|
||||||
@returns A stream of the user's actions containing the action of id
|
@returns A stream of the user's actions containing the action of id
|
||||||
**/
|
**/
|
||||||
loadUserAction: function(id) {
|
loadUserAction: function(id) {
|
||||||
var user = this;
|
var self = this,
|
||||||
var stream = this.get('stream');
|
stream = this.get('stream');
|
||||||
return Discourse.ajax("/user_actions/" + id + ".json", { cache: 'false' }).then(function(result) {
|
return Discourse.ajax("/user_actions/" + id + ".json", { cache: 'false' }).then(function(result) {
|
||||||
if (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)]);
|
var action = Discourse.UserAction.collapseStream([Discourse.UserAction.create(result)]);
|
||||||
stream.set('itemsLoaded', stream.get('itemsLoaded') + 1);
|
stream.set('itemsLoaded', stream.get('itemsLoaded') + 1);
|
||||||
stream.get('content').insertAt(0, action[0]);
|
stream.get('content').insertAt(0, action[0]);
|
||||||
|
|
Loading…
Reference in New Issue