From 3097411dd736751eaaef7e605cb825b4d413b537 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 19 Dec 2019 10:34:03 -0500 Subject: [PATCH] don't show comments from images which are hidden --- lib/philomena_web/controllers/profile_controller.ex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/philomena_web/controllers/profile_controller.ex b/lib/philomena_web/controllers/profile_controller.ex index 9411ad6f..c160b5bd 100644 --- a/lib/philomena_web/controllers/profile_controller.ex +++ b/lib/philomena_web/controllers/profile_controller.ex @@ -25,6 +25,7 @@ defmodule PhilomenaWeb.ProfileController do plug :set_mod_notes def show(conn, _params) do + current_filter = conn.assigns.current_filter current_user = conn.assigns.current_user user = conn.assigns.user @@ -68,6 +69,9 @@ defmodule PhilomenaWeb.ProfileController do %{term: %{user_id: user.id}}, %{term: %{anonymous: false}}, %{term: %{hidden_from_users: false}} + ], + must_not: [ + %{terms: %{image_tag_ids: current_filter.hidden_tag_ids}} ] } },