Fix posting non-polls from mastofe
authorrinpatch <rinpatch@sdf.org>
Tue, 21 May 2019 11:19:03 +0000 (14:19 +0300)
committerrinpatch <rinpatch@sdf.org>
Tue, 21 May 2019 11:19:03 +0000 (14:19 +0300)
lib/pleroma/web/common_api/utils.ex

index 97172fd941aa4fd09e74fe7579f9d8e39f85c570..66153a105e2e6f987062f5e11344a12c8230d1f5 100644 (file)
@@ -157,7 +157,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
     end
   end
 
-  def make_poll_data(%{"poll" => _}) do
+  def make_poll_data(%{"poll" => poll}) when is_map(poll) do
     "Invalid poll"
   end