Lint files
This commit is contained in:
parent
eec33315aa
commit
ca737a220f
2 changed files with 10 additions and 2 deletions
|
@ -598,6 +598,7 @@ defp restrict_thread_visibility(query, %{user: %User{skip_thread_containment: tr
|
||||||
|
|
||||||
defp restrict_thread_visibility(query, %{user: %User{ap_id: ap_id}}, _) do
|
defp restrict_thread_visibility(query, %{user: %User{ap_id: ap_id}}, _) do
|
||||||
local_public = as_local_public()
|
local_public = as_local_public()
|
||||||
|
|
||||||
from(
|
from(
|
||||||
a in query,
|
a in query,
|
||||||
where: fragment("thread_visibility(?, (?)->>'id', ?) = true", ^ap_id, a.data, ^local_public)
|
where: fragment("thread_visibility(?, (?)->>'id', ?) = true", ^ap_id, a.data, ^local_public)
|
||||||
|
@ -688,7 +689,11 @@ defp user_activities_recipients(%{godmode: true}), do: []
|
||||||
|
|
||||||
defp user_activities_recipients(%{reading_user: reading_user}) do
|
defp user_activities_recipients(%{reading_user: reading_user}) do
|
||||||
if not is_nil(reading_user) and reading_user.local do
|
if not is_nil(reading_user) and reading_user.local do
|
||||||
[Constants.as_public(), as_local_public(), reading_user.ap_id | User.following(reading_user)]
|
[
|
||||||
|
Constants.as_public(),
|
||||||
|
as_local_public(),
|
||||||
|
reading_user.ap_id | User.following(reading_user)
|
||||||
|
]
|
||||||
else
|
else
|
||||||
[Constants.as_public()]
|
[Constants.as_public()]
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,7 +7,10 @@ def up do
|
||||||
end
|
end
|
||||||
|
|
||||||
def down do
|
def down do
|
||||||
execute("DROP FUNCTION IF EXISTS thread_visibility(actor varchar, activity_id varchar, local_public varchar)")
|
execute(
|
||||||
|
"DROP FUNCTION IF EXISTS thread_visibility(actor varchar, activity_id varchar, local_public varchar)"
|
||||||
|
)
|
||||||
|
|
||||||
execute(restore_thread_visibility())
|
execute(restore_thread_visibility())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue