FIX: Remove quoted post text and block realtime replies from ignored users (#7336)

FIX: Remove quoted post text and block realtime replies from ignored users (#7336)

diff --git a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
index c8458f5..4c36e30 100644
--- a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
+++ b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
@@ -223,7 +223,7 @@ export default class PostCooked {
         .trim()
         .slice(0, -1);
       if (username.length > 0 && this.ignoredUsers.includes(username)) {
-        $aside.find("p").replaceWith(`<i>${I18n.t("post.ignored")}</i>`);
+        $aside.find("p").remove();
       }
     }
     $(".quote-controls", $aside).html(expandContract + navLink);
diff --git a/app/assets/javascripts/discourse/widgets/post.js.es6 b/app/assets/javascripts/discourse/widgets/post.js.es6
index ae6a351..94c921c 100644
--- a/app/assets/javascripts/discourse/widgets/post.js.es6
+++ b/app/assets/javascripts/discourse/widgets/post.js.es6
@@ -659,14 +659,6 @@ export default createWidget("post", {
     } else {
       classNames.push("regular");
     }
-    if (
-      this.currentUser &&
-      this.currentUser.ignored_users &&
-      this.currentUser.ignored_users.length > 0 &&
-      this.currentUser.ignored_users.includes(attrs.username)
-    ) {
-      classNames.push("post-ignored");
-    }
     if (addPostClassesCallbacks) {
       for (let i = 0; i < addPostClassesCallbacks.length; i++) {
         let pluginClasses = addPostClassesCallbacks[i].call(this, attrs);
diff --git a/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6
index 3be5e2c..fdf258e 100644
--- a/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6
+++ b/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6
@@ -46,9 +46,10 @@ export default Ember.Component.extend({
     return `/presence/topic/${topicId}`;
   },
 
-  @computed("presenceUsers", "currentUser.id")
-  users(users, currentUserId) {
-    return (users || []).filter(user => user.id !== currentUserId);
+  @computed("presenceUsers", "currentUser.{id,ignored_users}")
+  users(users, currentUser) {
+    const ignoredUsers = currentUser.ignored_users || [];
+    return (users || []).filter(user => user.id !== currentUser.id && !ignoredUsers.includes(user.username));
   },
 
   shouldDisplay: Ember.computed.gt("users.length", 0)

GitHub sha: 59579913