diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-05-18 15:58:18 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-05-18 15:58:18 +0200 |
commit | beb7b0ef07f880b6eecc01d04980b38ba8521a81 (patch) | |
tree | 44ce9731d05b18a24d25582394bb3d46f1a4779c /lib | |
parent | 0da6ade619b08ab543644a5629c347f65db09e63 (diff) | |
download | pleroma-beb7b0ef07f880b6eecc01d04980b38ba8521a81.tar.gz |
Handle incoming tags.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/ostatus/ostatus.ex | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/pleroma/web/ostatus/ostatus.ex b/lib/pleroma/web/ostatus/ostatus.ex index 949b36664..e913e389f 100644 --- a/lib/pleroma/web/ostatus/ostatus.ex +++ b/lib/pleroma/web/ostatus/ostatus.ex @@ -133,6 +133,11 @@ defmodule Pleroma.Web.OStatus do end end + def get_tags(entry) do + :xmerl_xpath.string('//category', entry) + |> Enum.map(fn (category) -> string_from_xpath("/category/@term", category) end) + end + def handle_note(entry, doc \\ nil) do content_html = get_content(entry) @@ -163,6 +168,8 @@ defmodule Pleroma.Web.OStatus do end end + tags = get_tags(entry) + to = [ "https://www.w3.org/ns/activitystreams#Public", User.ap_followers(actor) @@ -184,7 +191,8 @@ defmodule Pleroma.Web.OStatus do "published" => date, "context" => context, "actor" => actor.ap_id, - "attachment" => attachments + "attachment" => attachments, + "tag" => tags } object = if inReplyTo do |