ostatus: fetch preloaded object in note handler for testsuite
authorWilliam Pitcock <nenolod@dereferenced.org>
Sat, 23 Mar 2019 01:17:26 +0000 (01:17 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sat, 23 Mar 2019 01:17:26 +0000 (01:17 +0000)
lib/pleroma/web/ostatus/handlers/note_handler.ex

index 770a71a0a3c22c4d93a026331c30519ca87d7866..db995ec77d2307da309192dc57dcefe9fdbb77a5 100644 (file)
@@ -106,7 +106,7 @@ defmodule Pleroma.Web.OStatus.NoteHandler do
   # TODO: Clean this up a bit.
   def handle_note(entry, doc \\ nil) do
     with id <- XML.string_from_xpath("//id", entry),
-         activity when is_nil(activity) <- Activity.get_create_by_object_ap_id(id),
+         activity when is_nil(activity) <- Activity.get_create_by_object_ap_id_with_object(id),
          [author] <- :xmerl_xpath.string('//author[1]', doc),
          {:ok, actor} <- OStatus.find_make_or_update_user(author),
          content_html <- OStatus.get_content(entry),