Fix query
This commit is contained in:
parent
86ce4afd93
commit
cd13613db3
@ -8,6 +8,8 @@ defmodule Pleroma.Backup do
|
|||||||
import Ecto.Changeset
|
import Ecto.Changeset
|
||||||
import Ecto.Query
|
import Ecto.Query
|
||||||
|
|
||||||
|
require Pleroma.Constants
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.Bookmark
|
alias Pleroma.Bookmark
|
||||||
alias Pleroma.Repo
|
alias Pleroma.Repo
|
||||||
@ -158,6 +160,7 @@ defmodule Pleroma.Backup do
|
|||||||
"id": "#{name}.json",
|
"id": "#{name}.json",
|
||||||
"type": "OrderedCollection",
|
"type": "OrderedCollection",
|
||||||
"orderedItems": [
|
"orderedItems": [
|
||||||
|
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -209,13 +212,13 @@ defmodule Pleroma.Backup do
|
|||||||
opts =
|
opts =
|
||||||
%{}
|
%{}
|
||||||
|> Map.put(:type, ["Create", "Announce"])
|
|> Map.put(:type, ["Create", "Announce"])
|
||||||
|> Map.put(:blocking_user, user)
|
|> Map.put(:actor_id, user.ap_id)
|
||||||
|> Map.put(:muting_user, user)
|
|
||||||
|> Map.put(:reply_filtering_user, user)
|
|
||||||
|> Map.put(:announce_filtering_user, user)
|
|
||||||
|> Map.put(:user, user)
|
|
||||||
|
|
||||||
[[user.ap_id], User.following(user), Pleroma.List.memberships(user)]
|
[
|
||||||
|
[Pleroma.Constants.as_public(), user.ap_id],
|
||||||
|
User.following(user),
|
||||||
|
Pleroma.List.memberships(user)
|
||||||
|
]
|
||||||
|> Enum.concat()
|
|> Enum.concat()
|
||||||
|> ActivityPub.fetch_activities_query(opts)
|
|> ActivityPub.fetch_activities_query(opts)
|
||||||
|> write(dir, "outbox", fn a ->
|
|> write(dir, "outbox", fn a ->
|
||||||
|
Loading…
Reference in New Issue
Block a user