mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
FIX: Was not filtering correctly on the user's stream
This commit is contained in:
parent
7cc4a157f6
commit
55457810ba
1 changed files with 3 additions and 3 deletions
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue