mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-03-09 13:12:38 +00:00
Link to exported outbox/followers/following collections in backup actor.json
Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
parent
138ead9856
commit
855294bb3d
3 changed files with 11 additions and 4 deletions
1
changelog.d/backup-links.add
Normal file
1
changelog.d/backup-links.add
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Link to exported outbox/followers/following collections in backup actor.json
|
|
@ -246,7 +246,13 @@ defmodule Pleroma.User.Backup do
|
||||||
defp actor(dir, user) do
|
defp actor(dir, user) do
|
||||||
with {:ok, json} <-
|
with {:ok, json} <-
|
||||||
UserView.render("user.json", %{user: user})
|
UserView.render("user.json", %{user: user})
|
||||||
|> Map.merge(%{"likes" => "likes.json", "bookmarks" => "bookmarks.json"})
|
|> Map.merge(%{
|
||||||
|
"bookmarks" => "bookmarks.json",
|
||||||
|
"likes" => "likes.json",
|
||||||
|
"outbox" => "outbox.json",
|
||||||
|
"followers" => "followers.json",
|
||||||
|
"following" => "following.json"
|
||||||
|
})
|
||||||
|> Jason.encode() do
|
|> Jason.encode() do
|
||||||
File.write(Path.join(dir, "actor.json"), json)
|
File.write(Path.join(dir, "actor.json"), json)
|
||||||
end
|
end
|
||||||
|
|
|
@ -185,13 +185,13 @@ defmodule Pleroma.User.BackupTest do
|
||||||
%{"@language" => "und"}
|
%{"@language" => "und"}
|
||||||
],
|
],
|
||||||
"bookmarks" => "bookmarks.json",
|
"bookmarks" => "bookmarks.json",
|
||||||
"followers" => "http://cofe.io/users/cofe/followers",
|
"followers" => "followers.json",
|
||||||
"following" => "http://cofe.io/users/cofe/following",
|
"following" => "following.json",
|
||||||
"id" => "http://cofe.io/users/cofe",
|
"id" => "http://cofe.io/users/cofe",
|
||||||
"inbox" => "http://cofe.io/users/cofe/inbox",
|
"inbox" => "http://cofe.io/users/cofe/inbox",
|
||||||
"likes" => "likes.json",
|
"likes" => "likes.json",
|
||||||
"name" => "Cofe",
|
"name" => "Cofe",
|
||||||
"outbox" => "http://cofe.io/users/cofe/outbox",
|
"outbox" => "outbox.json",
|
||||||
"preferredUsername" => "cofe",
|
"preferredUsername" => "cofe",
|
||||||
"publicKey" => %{
|
"publicKey" => %{
|
||||||
"id" => "http://cofe.io/users/cofe#main-key",
|
"id" => "http://cofe.io/users/cofe#main-key",
|
||||||
|
|
Loading…
Reference in a new issue