utils: make_create_data: add support for Article objects
This commit is contained in:
parent
c42f28b82c
commit
bd479606ba
|
@ -128,7 +128,7 @@ def lazy_put_object_defaults(map, activity \\ %{}) do
|
||||||
Inserts a full object if it is contained in an activity.
|
Inserts a full object if it is contained in an activity.
|
||||||
"""
|
"""
|
||||||
def insert_full_object(%{"object" => %{"type" => type} = object_data})
|
def insert_full_object(%{"object" => %{"type" => type} = object_data})
|
||||||
when is_map(object_data) and type in ["Note"] do
|
when is_map(object_data) and type in ["Article", "Note"] do
|
||||||
with {:ok, _} <- Object.create(object_data) do
|
with {:ok, _} <- Object.create(object_data) do
|
||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue