Expose content type of status sources

This commit is contained in:
Tusooa Zhu 2022-06-04 12:56:56 -04:00
commit fe2d4778ee
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
6 changed files with 73 additions and 5 deletions

View file

@ -224,7 +224,10 @@ defmodule Pleroma.Web.CommonAPI.ActivityDraft do
object =
note_data
|> Map.put("emoji", emoji)
|> Map.put("source", draft.status)
|> Map.put("source", %{
"content" => draft.status,
"mediaType" => Utils.get_content_type(draft.params[:content_type])
})
|> Map.put("generator", draft.params[:generator])
%__MODULE__{draft | object: object}