Fix query

This commit is contained in:
Egor Kislitsyn 2020-09-10 20:53:06 +04:00
parent 86ce4afd93
commit cd13613db3
No known key found for this signature in database
GPG Key ID: 1B49CB15B71E7805
1 changed files with 9 additions and 6 deletions

View File

@ -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 ->