Transmogrifier: Only set replies on objects, not activities.
This commit is contained in:
parent
4c537534ad
commit
fc15c25889
1 changed files with 5 additions and 2 deletions
|
|
@ -742,8 +742,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||
Inline first page of the `replies` collection,
|
||||
containing any replies in chronological order.
|
||||
"""
|
||||
def set_replies(obj_data) do
|
||||
with obj_ap_id when obj_ap_id != nil <- obj_data["id"],
|
||||
def set_replies(%{"type" => type} = obj_data)
|
||||
when type in Pleroma.Constants.status_object_types() do
|
||||
with obj_ap_id when is_binary(obj_ap_id) <- obj_data["id"],
|
||||
limit when limit > 0 <-
|
||||
Pleroma.Config.get([:activitypub, :note_replies_output_limit], 0),
|
||||
collection <-
|
||||
|
|
@ -757,6 +758,8 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||
end
|
||||
end
|
||||
|
||||
def set_replies(obj_data), do: obj_data
|
||||
|
||||
# Prepares the object of an outgoing create activity.
|
||||
def prepare_object(object) do
|
||||
object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue