aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/utils.ex
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-12-07 13:41:54 -0500
committerAlex Gleason <alex@alexgleason.me>2021-12-07 13:41:54 -0500
commit2c96668a2c20906e5159fdea9326dbba4ca6ca62 (patch)
treee7fc1def45d51ba8011c1cfacb28c2523279e09b /lib/pleroma/web/common_api/utils.ex
parent335684182a094c10fb9f72e3865fd1b9606484a4 (diff)
parentb57041c59a14df78b4a461e68911a9edc788bc0a (diff)
downloadpleroma-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.ex27
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