Transmogrifier: federate quotes with _misskey_quote field
This commit is contained in:
parent
cf8e425883
commit
3c8319fe9f
3 changed files with 15 additions and 0 deletions
|
|
@ -660,6 +660,14 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||
|
||||
def set_reply_to_uri(obj), do: obj
|
||||
|
||||
# Misskey quotes
|
||||
# Despite being underscored, it's potentially more reliable for interop.
|
||||
def set_quote_url(%{"quoteUrl" => quote_url} = object) when is_binary(quote_url) do
|
||||
Map.put(object, "_misskey_quote", quote_url)
|
||||
end
|
||||
|
||||
def set_quote_url(obj), do: obj
|
||||
|
||||
@doc """
|
||||
Serialized Mastodon-compatible `replies` collection containing _self-replies_.
|
||||
Based on Mastodon's ActivityPub::NoteSerializer#replies.
|
||||
|
|
@ -714,6 +722,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||
|> prepare_attachments
|
||||
|> set_conversation
|
||||
|> set_reply_to_uri
|
||||
|> set_quote_url
|
||||
|> set_replies
|
||||
|> strip_internal_fields
|
||||
|> strip_internal_tags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue