Fix query
This commit is contained in:
parent
86ce4afd93
commit
cd13613db3
1 changed files with 9 additions and 6 deletions
|
@ -8,6 +8,8 @@ defmodule Pleroma.Backup do
|
|||
import Ecto.Changeset
|
||||
import Ecto.Query
|
||||
|
||||
require Pleroma.Constants
|
||||
|
||||
alias Pleroma.Activity
|
||||
alias Pleroma.Bookmark
|
||||
alias Pleroma.Repo
|
||||
|
@ -158,6 +160,7 @@ defp write_header(file, name) do
|
|||
"id": "#{name}.json",
|
||||
"type": "OrderedCollection",
|
||||
"orderedItems": [
|
||||
|
||||
"""
|
||||
)
|
||||
end
|
||||
|
@ -209,13 +212,13 @@ defp statuses(dir, user) do
|
|||
opts =
|
||||
%{}
|
||||
|> Map.put(:type, ["Create", "Announce"])
|
||||
|> Map.put(:blocking_user, user)
|
||||
|> Map.put(:muting_user, user)
|
||||
|> Map.put(:reply_filtering_user, user)
|
||||
|> Map.put(:announce_filtering_user, user)
|
||||
|> Map.put(:user, user)
|
||||
|> Map.put(:actor_id, user.ap_id)
|
||||
|
||||
[[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()
|
||||
|> ActivityPub.fetch_activities_query(opts)
|
||||
|> write(dir, "outbox", fn a ->
|
||||
|
|
Loading…
Reference in a new issue