fix no-language-specified federation
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending

This commit is contained in:
FloatingGhost 2023-01-11 15:25:34 +00:00
parent 22068f0853
commit 78c44f31ca

View file

@ -145,7 +145,10 @@ defp language(%{params: %{language: language}, content_html: content} = draft)
end end
end end
defp language(draft), do: draft defp language(%{content_html: content} = draft) do
# Use a default language if no language is specified
%__MODULE__{draft | content_map: %{"en" => content}}
end
defp visibility(%{params: params} = draft) do defp visibility(%{params: params} = draft) do
case CommonAPI.get_visibility(params, draft.in_reply_to, draft.in_reply_to_conversation) do case CommonAPI.get_visibility(params, draft.in_reply_to, draft.in_reply_to_conversation) do