diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-10-31 17:30:46 +0100 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-10-31 17:30:46 +0100 |
commit | 4cbf17dac6c9501e9fc711d04540da9afbcad717 (patch) | |
tree | f95148cb4f2e1857943a1c0da16cc09f5da0351d /lib/pleroma/web/ostatus/handlers/note_handler.ex | |
parent | 4dcbb64f19723334a9ef66b4ce71856d30e32796 (diff) | |
download | pleroma-4cbf17dac6c9501e9fc711d04540da9afbcad717.tar.gz |
Save cws in the activitypub data.
Diffstat (limited to 'lib/pleroma/web/ostatus/handlers/note_handler.ex')
-rw-r--r-- | lib/pleroma/web/ostatus/handlers/note_handler.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/ostatus/handlers/note_handler.ex b/lib/pleroma/web/ostatus/handlers/note_handler.ex index b151c118a..8747dbb67 100644 --- a/lib/pleroma/web/ostatus/handlers/note_handler.ex +++ b/lib/pleroma/web/ostatus/handlers/note_handler.ex @@ -94,6 +94,7 @@ defmodule Pleroma.Web.OStatus.NoteHandler do [author] <- :xmerl_xpath.string('//author[1]', doc), {:ok, actor} <- OStatus.find_make_or_update_user(author), content_html <- OStatus.get_content(entry), + cw <- OStatus.get_cw(entry), inReplyTo <- XML.string_from_xpath("//thr:in-reply-to[1]/@ref", entry), inReplyToActivity <- fetch_replied_to_activity(entry, inReplyTo), inReplyTo <- (inReplyToActivity && inReplyToActivity.data["object"]["id"]) || inReplyTo, @@ -103,7 +104,7 @@ defmodule Pleroma.Web.OStatus.NoteHandler do mentions <- get_mentions(entry), to <- make_to_list(actor, mentions), date <- XML.string_from_xpath("//published", entry), - note <- CommonAPI.Utils.make_note_data(actor.ap_id, to, context, content_html, attachments, inReplyToActivity, []), + note <- CommonAPI.Utils.make_note_data(actor.ap_id, to, context, content_html, attachments, inReplyToActivity, [], cw), note <- note |> Map.put("id", id) |> Map.put("tag", tags), note <- note |> Map.put("published", date), note <- note |> Map.put("emoji", get_emoji(entry)), |