Pleroma v1.1.9-10-g42f76306+dev Pleroma.Web.ActivityPub.Utils View Source

Link to this section Summary

Functions

Fetches the OrderedCollection/OrderedCollectionPage from from, limiting the amount of pages fetched after the first one to pages_left pages. If the amount of pages is higher than the collection has, it returns whatever was there.

Retruns an existing announce activity if the notice has already been announced

Returns an existing like if a user already liked an object

Inserts a full object if it is contained in an activity.

Adds an id and a published data if they aren't there, also adds it to an included object

Adds an id and published date if they aren't there.

Make announce activity data for the given actor and object

Makes a follow activity data for the given follower and followed

Make unannounce activity data for the given actor and object

Enqueues an activity for federation if it's local

Updates a follow activity's state (for locked accounts).

Link to this section Functions

Link to this function

add_announce_to_object(arg1, object)

View Source
Link to this function

add_like_to_object(activity, object)

View Source
add_like_to_object(Pleroma.Activity.t(), Pleroma.Object.t()) ::
  {:ok, Pleroma.Object.t()} | {:error, Ecto.Changeset.t()}
Link to this function

determine_explicit_mentions(object)

View Source
Link to this function

fetch_latest_block(user1, user2)

View Source
Link to this function

fetch_latest_follow(user1, user2)

View Source
Link to this function

fetch_ordered_collection(from, pages_left, acc \\ [])

View Source

Fetches the OrderedCollection/OrderedCollectionPage from from, limiting the amount of pages fetched after the first one to pages_left pages. If the amount of pages is higher than the collection has, it returns whatever was there.

Link to this function

get_existing_announce(actor, map)

View Source

Retruns an existing announce activity if the notice has already been announced

Link to this function

get_existing_like(actor, map)

View Source
get_existing_like(String.t(), map()) :: Pleroma.Activity.t() | nil

Returns an existing like if a user already liked an object

Link to this function

get_existing_votes(actor, map)

View Source
Link to this function

get_notified_from_object(object)

View Source

Inserts a full object if it is contained in an activity.

Link to this function

lazy_put_activity_defaults(map, fake? \\ false)

View Source

Adds an id and a published data if they aren't there, also adds it to an included object

Link to this function

lazy_put_object_defaults(map, activity \\ %{}, fake?)

View Source

Adds an id and published date if they aren't there.

Link to this function

make_announce_data(user, object, activity_id, bool)

View Source

Make announce activity data for the given actor and object

Link to this function

make_block_data(blocker, blocked, activity_id)

View Source
Link to this function

make_create_data(params, additional)

View Source
Link to this function

make_flag_data(params, additional)

View Source
Link to this function

make_follow_data(user, followed, activity_id)

View Source

Makes a follow activity data for the given follower and followed

Link to this function

make_like_data(actor, object, activity_id)

View Source
make_like_data(Pleroma.User.t(), map(), String.t()) :: map()
Link to this function

make_unannounce_data(user, activity, activity_id)

View Source

Make unannounce activity data for the given actor and object

Link to this function

make_unblock_data(blocker, blocked, block_activity, activity_id)

View Source
Link to this function

make_unfollow_data(follower, followed, follow_activity, activity_id)

View Source
Link to this function

make_unlike_data(user, activity, activity_id)

View Source
Link to this function

maybe_federate(activity)

View Source
maybe_federate(any()) :: :ok

Enqueues an activity for federation if it's local

Link to this function

maybe_put(map, key, value)

View Source
Link to this function

maybe_splice_recipient(ap_id, params)

View Source
Link to this function

normalize_params(params)

View Source
Link to this function

recipient_in_message(recipient, actor, params)

View Source
Link to this function

remove_announce_from_object(activity, object)

View Source
Link to this function

remove_like_from_object(activity, object)

View Source
remove_like_from_object(Pleroma.Activity.t(), Pleroma.Object.t()) ::
  {:ok, Pleroma.Object.t()} | {:error, Ecto.Changeset.t()}
Link to this function

update_activity_visibility(activity, visibility)

View Source
Link to this function

update_element_in_object(property, element, object)

View Source
update_element_in_object(String.t(), [any()], Pleroma.Object.t()) ::
  {:ok, Pleroma.Object.t()} | {:error, Ecto.Changeset.t()}
Link to this function

update_follow_state(activity, state)

View Source
Link to this function

update_follow_state_for_all(activity, state)

View Source

Updates a follow activity's state (for locked accounts).

Link to this function

update_report_state(activity, state)

View Source