From 185b480b12916a36db139fb8fca86b232fda3095 Mon Sep 17 00:00:00 2001 From: Moon Man Date: Tue, 3 Sep 2024 15:15:52 +0000 Subject: [PATCH] override actor --- lib/vonbraun/activity_pub/object.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vonbraun/activity_pub/object.ex b/lib/vonbraun/activity_pub/object.ex index 4d0fc63..3f675d6 100644 --- a/lib/vonbraun/activity_pub/object.ex +++ b/lib/vonbraun/activity_pub/object.ex @@ -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