diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-12-07 13:41:54 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-12-07 13:41:54 -0500 |
commit | 2c96668a2c20906e5159fdea9326dbba4ca6ca62 (patch) | |
tree | e7fc1def45d51ba8011c1cfacb28c2523279e09b /lib/pleroma/web/common_api/utils.ex | |
parent | 335684182a094c10fb9f72e3865fd1b9606484a4 (diff) | |
parent | b57041c59a14df78b4a461e68911a9edc788bc0a (diff) | |
download | pleroma-2c96668a2c20906e5159fdea9326dbba4ca6ca62.tar.gz |
Merge remote-tracking branch 'origin/develop' into fix-attachment-dimensions
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 10eb48250..b6feaf32a 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -291,33 +291,6 @@ defmodule Pleroma.Web.CommonAPI.Utils do |> Formatter.html_escape("text/html") end - def make_note_data(%ActivityDraft{} = draft) do - %{ - "type" => "Note", - "to" => draft.to, - "cc" => draft.cc, - "content" => draft.content_html, - "summary" => draft.summary, - "sensitive" => draft.sensitive, - "context" => draft.context, - "attachment" => draft.attachments, - "actor" => draft.user.ap_id, - "tag" => Keyword.values(draft.tags) |> Enum.uniq() - } - |> add_in_reply_to(draft.in_reply_to) - |> Map.merge(draft.extra) - end - - defp add_in_reply_to(object, nil), do: object - - defp add_in_reply_to(object, in_reply_to) do - with %Object{} = in_reply_to_object <- Object.normalize(in_reply_to, fetch: false) do - Map.put(object, "inReplyTo", in_reply_to_object.data["id"]) - else - _ -> object - end - end - def format_naive_asctime(date) do date |> DateTime.from_naive!("Etc/UTC") |> format_asctime end |