mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
don't show comments from images which are hidden
This commit is contained in:
parent
c01ef54a71
commit
3097411dd7
1 changed files with 4 additions and 0 deletions
|
@ -25,6 +25,7 @@ defmodule PhilomenaWeb.ProfileController do
|
||||||
plug :set_mod_notes
|
plug :set_mod_notes
|
||||||
|
|
||||||
def show(conn, _params) do
|
def show(conn, _params) do
|
||||||
|
current_filter = conn.assigns.current_filter
|
||||||
current_user = conn.assigns.current_user
|
current_user = conn.assigns.current_user
|
||||||
user = conn.assigns.user
|
user = conn.assigns.user
|
||||||
|
|
||||||
|
@ -68,6 +69,9 @@ defmodule PhilomenaWeb.ProfileController do
|
||||||
%{term: %{user_id: user.id}},
|
%{term: %{user_id: user.id}},
|
||||||
%{term: %{anonymous: false}},
|
%{term: %{anonymous: false}},
|
||||||
%{term: %{hidden_from_users: false}}
|
%{term: %{hidden_from_users: false}}
|
||||||
|
],
|
||||||
|
must_not: [
|
||||||
|
%{terms: %{image_tag_ids: current_filter.hidden_tag_ids}}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue