diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-04-26 10:22:51 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-04-26 10:22:51 +0200 |
commit | f1ebf812eede5b77931d2315757a7ad8e0ea5a7e (patch) | |
tree | 49927aaa3f5028b8fadba4a05d1b5cd761dd7167 /lib | |
parent | d9ebd785ab7d9b371ba5accdc6ca5d72af7b509d (diff) | |
download | pleroma-f1ebf812eede5b77931d2315757a7ad8e0ea5a7e.tar.gz |
Add inReplyTo to incoming messages.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/ostatus/ostatus.ex | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/pleroma/web/ostatus/ostatus.ex b/lib/pleroma/web/ostatus/ostatus.ex index 65141f826..5b68f057e 100644 --- a/lib/pleroma/web/ostatus/ostatus.ex +++ b/lib/pleroma/web/ostatus/ostatus.ex @@ -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 |