Store application details in the object under the generator key, not application key

This commit is contained in:
Mark Felder 2021-03-01 11:29:10 -06:00
commit b1e1db82bc
5 changed files with 10 additions and 10 deletions

View file

@ -205,7 +205,7 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
{:ok, activity} =
CommonAPI.post(user, %{
status: "#2hu :firefox:",
application: %{type: "Application", name: "TestClient", url: "https://pleroma.social"}
generator: %{type: "Application", name: "TestClient", url: "https://pleroma.social"}
})
# Ensure injected application data made it into the activity
@ -215,7 +215,7 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
type: "Application",
name: "TestClient",
url: "https://pleroma.social"
} == activity.object.data["application"]
} == activity.object.data["generator"]
{:ok, modified} = Transmogrifier.prepare_outgoing(activity.data)
@ -226,7 +226,7 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
assert is_nil(modified["object"]["announcements"])
assert is_nil(modified["object"]["announcement_count"])
assert is_nil(modified["object"]["context_id"])
assert is_nil(modified["object"]["application"])
assert is_nil(modified["object"]["generator"])
end
test "it strips internal fields of article" do