override actor

This commit is contained in:
Moon Man 2024-09-03 15:15:52 +00:00
parent cb138abc08
commit 185b480b12
1 changed files with 3 additions and 1 deletions

View File

@ -29,6 +29,8 @@ defmodule Vonbraun.ActivityPub.Object do
copy_recipients? = Keyword.get(options, :copy_recipients, false)
actor_id = Keyword.get(options, :actor, my_id())
object =
if is_map(object) && copy_recipients? do
Map.merge(object, %{"to" => to, "cc" => cc})
@ -44,7 +46,7 @@ defmodule Vonbraun.ActivityPub.Object do
"bcc" => [],
"bto" => [],
"type" => type,
"actor" => my_id(),
"actor" => actor_id,
"object" => object
}
end