View Source ActivityPub.Utils (bonfire v0.3.5-classic-beta.7)

Misc functions used for federation

Link to this section Summary

Functions

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.

Make announce activity data for the given actor and object

Make unannounce activity data for the given actor and object

Enqueues an activity for federation if it's local

Some implementations send the actor URI as the actor field, others send the entire actor object, this function figures out what the actor's URI is based on what we have.

Prepares a struct to be inserted into the objects table

Determines if an object or an activity is public.

Link to this section Functions

Link to this function

fetch_latest_block(map1, map2)

View Source
Link to this function

fetch_latest_follow(map1, map2)

View Source
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

Returns an existing like if a user already liked an object

Link to this function

insert_full_object(activity, local \\ false, pointer \\ nil, upsert? \\ false)

View Source

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

Link to this function

lazy_put_activity_defaults(map, activity_id)

View Source
Link to this function

lazy_put_object_defaults(map, activity)

View Source
Link to this function

make_announce_data(actor, object, activity_id, public?, summary \\ nil)

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(map, followed, activity_id)

View Source
Link to this function

make_like_data(actor, object, activity_id)

View Source
Link to this function

make_unannounce_data(actor, 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(actor, activity, activity_id)

View Source
Link to this function

maybe_federate(activity)

View Source

Enqueues an activity for federation if it's local

Link to this function

normalize_params(params)

View Source

Some implementations send the actor URI as the actor field, others send the entire actor object, this function figures out what the actor's URI is based on what we have.

Link to this function

prepare_data(data, local \\ false, pointer \\ nil, activity \\ nil)

View Source

Prepares a struct to be inserted into the objects table

Determines if an object or an activity is public.

Link to this function

public?(activity_data, object_data)

View Source
Link to this function

supported_activity_types()

View Source