Web.ActivityPub.ActivityPub: Fix check_remote_limit/1 against activities with content: nil

This commit is contained in:
Haelwenn (lanodan) Monnier 2019-01-26 03:50:49 +01:00
parent 6383fa3a5d
commit 15aa45ae8a
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ defp check_actor_is_active(actor) do
end end
end end
defp check_remote_limit(%{"object" => %{"content" => content}}) do defp check_remote_limit(%{"object" => %{"content" => content}}) when not is_nil(content) do
limit = Pleroma.Config.get([:instance, :remote_limit]) limit = Pleroma.Config.get([:instance, :remote_limit])
String.length(content) <= limit String.length(content) <= limit
end end