-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -609,9 +609,14 @@ export default RestModel.extend({ | |
this.set("loadingLastPost", true); | ||
return this.findPostsByIds([postId]) | ||
.then(posts => { | ||
const ignoredUsers = this.get("currentUser.ignored_users"); | ||
const ignoredUsers = | ||
Discourse.User.current() && | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
davidtaylorhq
Author
Member
|
||
Discourse.User.current().get("ignored_users"); | ||
posts.forEach(p => { | ||
if (ignoredUsers && ignoredUsers.includes(p.username)) return; | ||
if (ignoredUsers && ignoredUsers.includes(p.username)) { | ||
this.stream.removeObject(postId); | ||
return; | ||
} | ||
this.appendPost(p); | ||
}); | ||
}) | ||
|
2 comments
on commit 4f1382a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit has been mentioned on Discourse Meta. There might be relevant details there:
https://meta.discourse.org/t/ability-to-ignore-a-user/110254/58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was resolved in f9894ae
Can you explain why you did this instead of
this.currentUser
? They should be the same, and in the long term we want to removeDiscourse.XYZ
constants.