1
0
Fork 0
forked from mirrors/akkoma

transmogrifier: slightly clean up fix_explicit_addressing pipeline

This commit is contained in:
William Pitcock 2018-12-23 15:44:26 +00:00
parent 420651157b
commit 7c9749f793

View file

@ -133,6 +133,7 @@ def fix_addressing(object) do
|> fix_addressing_list("cc")
|> fix_addressing_list("bto")
|> fix_addressing_list("bcc")
|> fix_explicit_addressing
end
def fix_actor(%{"attributedTo" => actor} = object) do
@ -367,7 +368,6 @@ def handle_incoming(%{"type" => "Create", "object" => %{"type" => objtype} = obj
data =
Map.put(data, "actor", actor)
|> fix_addressing
|> fix_explicit_addressing
with nil <- Activity.get_create_activity_by_object_ap_id(object["id"]),
%User{} = user <- User.get_or_fetch_by_ap_id(data["actor"]) do