Use hash of attachment url as id.
[akkoma] / lib / pleroma / web / ostatus / ostatus.ex
index 3e2acdd0facba28119100c3a043c05709f33124b..882226172f8da39481f4dacbc35a96f032bbc772 100644 (file)
@@ -56,6 +56,7 @@ defmodule Pleroma.Web.OStatus do
         rescue
           e ->
             Logger.error("Error occured while handling activity")
+            Logger.error(xml_string)
           Logger.error(inspect(e))
           nil
         end
@@ -299,7 +300,7 @@ defmodule Pleroma.Web.OStatus do
   end
 
   def fetch_activity_from_url(url) do
-    with {:ok, activities} <- fetch_activity_from_atom_url(url) do
+    with {:ok, activities} when length(activities) > 0 <- fetch_activity_from_atom_url(url) do
       {:ok, activities}
     else
       _e -> with {:ok, activities} <- fetch_activity_from_html_url(url) do