mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-11-06 00:42:56 +01:00
Make lint happy
Ref: fix-local-public
This commit is contained in:
parent
6e5ef7f2eb
commit
f1722a9f4a
@ -613,6 +613,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||
|
||||
defp restrict_thread_visibility(query, %{user: %User{ap_id: ap_id}}, _) do
|
||||
local_public = as_local_public()
|
||||
|
||||
from(
|
||||
a in query,
|
||||
where: fragment("thread_visibility(?, (?)->>'id', ?) = true", ^ap_id, a.data, ^local_public)
|
||||
@ -703,7 +704,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||
|
||||
defp user_activities_recipients(%{reading_user: reading_user}) 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
|
||||
[Constants.as_public()]
|
||||
end
|
||||
|
@ -7,7 +7,10 @@ defmodule Pleroma.Repo.Migrations.ChangeThreadVisibilityToBeLocalOnlyAware do
|
||||
end
|
||||
|
||||
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())
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user