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

View File

@ -64,7 +64,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub 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