Add inReplyTo to incoming messages.

This commit is contained in:
Roger Braun 2017-04-26 10:22:51 +02:00
commit f1ebf812ee
3 changed files with 60 additions and 0 deletions

View file

@ -65,6 +65,14 @@ defmodule Pleroma.Web.OStatus do
"actor" => actor.ap_id
}
inReplyTo = string_from_xpath("/entry/thr:in-reply-to[1]/@href", doc)
object = if inReplyTo do
Map.put(object, "inReplyTo", inReplyTo)
else
object
end
ActivityPub.create(to, actor, context, object, %{}, date)
end