commit: 855294bb3d802b801e3ec064341e4134253089a6
parent 138ead9856512506cc030ed429ffd05d4d03d14d
Author: mkljczk <git@mkljczk.pl>
Date: Thu, 9 Jan 2025 12:58:51 +0100
Link to exported outbox/followers/following collections in backup actor.json
Signed-off-by: mkljczk <git@mkljczk.pl>
Diffstat:
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/changelog.d/backup-links.add b/changelog.d/backup-links.add
@@ -0,0 +1 @@
+Link to exported outbox/followers/following collections in backup actor.json
diff --git a/lib/pleroma/user/backup.ex b/lib/pleroma/user/backup.ex
@@ -246,7 +246,13 @@ defmodule Pleroma.User.Backup do
defp actor(dir, user) do
with {:ok, json} <-
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
File.write(Path.join(dir, "actor.json"), json)
end
diff --git a/test/pleroma/user/backup_test.exs b/test/pleroma/user/backup_test.exs
@@ -185,13 +185,13 @@ defmodule Pleroma.User.BackupTest do
%{"@language" => "und"}
],
"bookmarks" => "bookmarks.json",
- "followers" => "http://cofe.io/users/cofe/followers",
- "following" => "http://cofe.io/users/cofe/following",
+ "followers" => "followers.json",
+ "following" => "following.json",
"id" => "http://cofe.io/users/cofe",
"inbox" => "http://cofe.io/users/cofe/inbox",
"likes" => "likes.json",
"name" => "Cofe",
- "outbox" => "http://cofe.io/users/cofe/outbox",
+ "outbox" => "outbox.json",
"preferredUsername" => "cofe",
"publicKey" => %{
"id" => "http://cofe.io/users/cofe#main-key",