mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-04-24 13:57:23 -04:00
Merge branch 'redo/strip-object-actor' into 'develop'
Draft: Redo: Strip actor from objects before federating See merge request pleroma/pleroma!4113
This commit is contained in:
commit
c896e0643f
3 changed files with 3 additions and 3 deletions
1
changelog.d/strip-object-actor.fix
Normal file
1
changelog.d/strip-object-actor.fix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
changelog.d/strip-object-actor.fix
|
|
@ -28,7 +28,7 @@ defmodule Pleroma.Object.Containment do
|
||||||
id
|
id
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_actor(%{"actor" => nil, "attributedTo" => actor}) when not is_nil(actor) do
|
def get_actor(%{"attributedTo" => actor}) when not is_nil(actor) do
|
||||||
get_actor(%{"actor" => actor})
|
get_actor(%{"actor" => actor})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -167,10 +167,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
||||||
def fix_actor(%{"attributedTo" => actor} = object) do
|
def fix_actor(%{"attributedTo" => actor} = object) do
|
||||||
actor = Containment.get_actor(%{"actor" => actor})
|
actor = Containment.get_actor(%{"actor" => actor})
|
||||||
|
|
||||||
# TODO: Remove actor field for Objects
|
|
||||||
object
|
object
|
||||||
|> Map.put("actor", actor)
|
|
||||||
|> Map.put("attributedTo", actor)
|
|> Map.put("attributedTo", actor)
|
||||||
|
|> Map.delete("actor")
|
||||||
end
|
end
|
||||||
|
|
||||||
def fix_in_reply_to(object, options \\ [])
|
def fix_in_reply_to(object, options \\ [])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue