From: FloatingGhost Date: Wed, 11 Jan 2023 15:25:34 +0000 (+0000) Subject: fix no-language-specified federation X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=78c44f31ca10c296dffc22e0b01a2a0cd9e25cfa;p=akkoma fix no-language-specified federation --- diff --git a/lib/pleroma/web/common_api/activity_draft.ex b/lib/pleroma/web/common_api/activity_draft.ex index adddea669..ced6371d6 100644 --- a/lib/pleroma/web/common_api/activity_draft.ex +++ b/lib/pleroma/web/common_api/activity_draft.ex @@ -145,7 +145,10 @@ defmodule Pleroma.Web.CommonAPI.ActivityDraft do 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 case CommonAPI.get_visibility(params, draft.in_reply_to, draft.in_reply_to_conversation) do