Web.ActivityPub.ActivityPub: Fix check_remote_limit/1 against activities with content...
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sat, 26 Jan 2019 02:50:49 +0000 (03:50 +0100)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sat, 26 Jan 2019 02:50:49 +0000 (03:50 +0100)
lib/pleroma/web/activity_pub/activity_pub.ex

index 6b4682e35837ca04ee02ac471cd98795915b9045..07779fa0029cb2c3496e172c09d63050ff6b1994 100644 (file)
@@ -64,7 +64,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
     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])
     String.length(content) <= limit
   end