ActivityDraft: detect language from content_html so it can strip links

This commit is contained in:
Alex Gleason 2022-11-08 17:23:41 -06:00
parent 728643b623
commit f844c4ba13
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -236,7 +236,7 @@ defp sensitive(draft) do
defp language(draft) do
language =
Utils.get_valid_language(draft.params[:language]) ||
LanguageDetector.detect(draft.full_payload)
LanguageDetector.detect(draft.content_html <> " " <> draft.summary)
%__MODULE__{draft | language: language}
end