FIX: Show hidden posts to staff members. (#11171)

When looking at the list of a user's deleted posts, those that are also hidden are not listed. Context: https://meta.discourse.org/t/flagged-deleted-posts-do-not-show-up-on-users-profile/168527
This commit is contained in:
Roman Rizzi 2020-11-10 12:34:22 -03:00 committed by GitHub
parent 0f38fc42e2
commit 5ae82c0492
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -1,16 +1,22 @@
import Component from "@ember/component";
import { propertyEqual } from "discourse/lib/computed";
import { computed } from "@ember/object";
import { actionDescription } from "discourse/widgets/post-small-action";
export default Component.extend({
classNameBindings: [
":user-stream-item",
":item", // DEPRECATED: 'item' class
"item.hidden",
"hidden",
"item.deleted:deleted",
"moderatorAction",
],
hidden: computed("item.hidden", function () {
return (
this.get("item.hidden") && !(this.currentUser && this.currentUser.staff)
);
}),
moderatorAction: propertyEqual(
"item.post_type",
"site.post_types.moderator_action"