Try to fetch from html again if fetching from atom gives no results.
authorRoger Braun <roger@rogerbraun.net>
Fri, 8 Sep 2017 07:08:31 +0000 (09:08 +0200)
committerRoger Braun <roger@rogerbraun.net>
Fri, 8 Sep 2017 07:08:31 +0000 (09:08 +0200)
lib/pleroma/web/ostatus/ostatus.ex

index 3e2acdd0facba28119100c3a043c05709f33124b..fa8c086d618b82f5d9751b899a504d4c6021c5a7 100644 (file)
@@ -299,7 +299,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