Don't fetch if we don't even have a inReplyTo.

This commit is contained in:
Roger Braun 2017-05-11 09:32:03 +02:00
parent 312772df7c
commit 2154f729b0

View File

@ -136,7 +136,7 @@ def handle_note(entry, doc \\ nil) do
{:ok, actor} = find_make_or_update_user(author) {:ok, actor} = find_make_or_update_user(author)
inReplyTo = string_from_xpath("//thr:in-reply-to[1]/@ref", entry) 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) inReplyToHref = string_from_xpath("//thr:in-reply-to[1]/@href", entry)
if inReplyToHref do if inReplyToHref do
fetch_activity_from_html_url(inReplyToHref) fetch_activity_from_html_url(inReplyToHref)