activitypub: publisher: fixups
authorWilliam Pitcock <nenolod@dereferenced.org>
Sun, 12 May 2019 05:01:00 +0000 (05:01 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sun, 12 May 2019 05:04:24 +0000 (05:04 +0000)
lib/pleroma/web/activity_pub/publisher.ex

index 11e54b77d3472eda80f47e1ff7dea4f9d207325c..5d72299a51ab5320db186c65157f25fae178fbf0 100644 (file)
@@ -26,10 +26,11 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
   Determine if an activity can be represented by running it through Transmogrifier.
   """
   def is_representable?(%Activity{} = activity) do
-    with %{} = _data <- Transmogrifier.prepare_outgoing(activity.data) do
+    with {:ok, _data} <- Transmogrifier.prepare_outgoing(activity.data) do
       true
     else
-      _e -> false
+      _e ->
+        false
     end
   end