ActivityPub: Fetch missing activities on reply.
This commit is contained in:
parent
947ba6495d
commit
810cf8618f
4 changed files with 41 additions and 5 deletions
|
|
@ -22,6 +22,21 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
|||
assert activity == returned_activity
|
||||
end
|
||||
|
||||
test "it fetches replied-to activities if we don't have them" do
|
||||
data = File.read!("test/fixtures/mastodon-post-activity.json")
|
||||
|> Poison.decode!
|
||||
|
||||
object = data["object"]
|
||||
|> Map.put("inReplyTo", "https://shitposter.club/notice/2827873")
|
||||
|
||||
data = data
|
||||
|> Map.put("object", object)
|
||||
|
||||
{:ok, returned_activity} = Transmogrifier.handle_incoming(data)
|
||||
|
||||
assert Activity.get_create_activity_by_object_ap_id("tag:shitposter.club,2017-05-05:noticeId=2827873:objectType=comment")
|
||||
end
|
||||
|
||||
test "it works for incoming notices" do
|
||||
data = File.read!("test/fixtures/mastodon-post-activity.json") |> Poison.decode!
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue