Don't fetch if we don't even have a inReplyTo.
authorRoger Braun <roger@rogerbraun.net>
Thu, 11 May 2017 07:32:03 +0000 (09:32 +0200)
committerRoger Braun <roger@rogerbraun.net>
Thu, 11 May 2017 07:32:03 +0000 (09:32 +0200)
lib/pleroma/web/ostatus/ostatus.ex

index 9cd440493889a7a05a61cfdedc71cd3f5edce32e..5a1abe09338f9d7ed58b6b86ebbb015deecd2f97 100644 (file)
@@ -136,7 +136,7 @@ defmodule Pleroma.Web.OStatus do
     {:ok, actor} = find_make_or_update_user(author)
     inReplyTo = string_from_xpath("//thr:in-reply-to[1]/@ref", entry)
 
-    if !Object.get_cached_by_ap_id(inReplyTo) do
+    if inReplyTo && !Object.get_cached_by_ap_id(inReplyTo) do
       inReplyToHref = string_from_xpath("//thr:in-reply-to[1]/@href", entry)
       if inReplyToHref do
         fetch_activity_from_html_url(inReplyToHref)