View Source Bonfire.Social.Requests (Bonfire v0.9.10-classic-beta.169)

Handles social requests (e.g. follows requests), including creating, accepting, ignoring, and managing requests.

Summary

Functions

Accepts a request.

Retrieves all requests by object.

Retrieves all requests by subject.

Retrieves all request objects by subject.

Retrieves all requested outboxes by user and type.

Retrieves all subjects by object.

Checks if a request exists.

Retrieves a request by filters.

Ignores a request.

Lists all requests made by the current user.

Lists all requesters for the current user.

Lists all requests made by the given user.

Lists all requesters for the given user.

Prepares a DB query based on filters and type.

Requests to do something, and federates it.

Retrieves a request.

Checks if a request has been made.

Functions

Accepts a request.

Examples

iex> accept(request, opts)
{:ok, request}
Link to this function

all_by_object(user, type, opts \\ [])

View Source

Retrieves all requests by object.

Examples

iex> all_by_object(user, type, opts)
[{:ok, request}]
Link to this function

all_by_subject(user, type, opts \\ [])

View Source

Retrieves all requests by subject.

Examples

iex> all_by_subject(user, type, opts)
[{:ok, request}]
Link to this function

all_objects_by_subject(user, type, opts \\ [])

View Source

Retrieves all request objects by subject.

Examples

iex> all_objects_by_subject(user, type, opts)
[object]
Link to this function

all_requested_outboxes(user, type, opts \\ [])

View Source

Retrieves all requested outboxes by user and type.

Examples

iex> all_requested_outboxes(user, type, opts)
[outbox_id]
Link to this function

all_subjects_by_object(user, type, opts \\ [])

View Source

Retrieves all subjects by object.

Examples

iex> all_subjects_by_object(user, type, opts)
[subject]
Link to this function

ap_publish_activity(subject, verb, action)

View Source
Link to this function

exists?(subject, type, object, opts \\ [])

View Source

Checks if a request exists.

Examples

iex> exists?(subject, Follow, object, opts)
true
Link to this function

get(filters, opts \\ [])

View Source

Retrieves a request by filters.

Examples

iex> get(filters, opts)
{:ok, request}
Link to this function

get(subject, type, object, opts \\ [])

View Source

Retrieves a request.

Examples

iex> get(subject, Follow, object, opts)
{:ok, request}
Link to this function

get!(subject, type, object, opts \\ [])

View Source

Ignores a request.

Examples

iex> ignore(request, opts)
{:ok, request}

Lists all requests made by the current user.

Examples

iex> list_my_requested(opts)
[{:ok, request}]
Link to this function

list_my_requesters(opts)

View Source

Lists all requesters for the current user.

Examples

iex> list_my_requesters(opts)
[{:ok, requester}]
Link to this function

list_requested(user, opts \\ [])

View Source

Lists all requests made by the given user.

Examples

iex> list_requested(user, opts)
[{:ok, request}]
Link to this function

list_requesters(user, opts \\ [])

View Source

Lists all requesters for the given user.

Examples

iex> list_requesters(user, opts)
[{:ok, requester}]
Link to this function

query(filters, type \\ nil, opts)

View Source

Prepares a DB query based on filters and type.

Examples

iex> query(filters, type, opts)
{:ok, query}

Callback implementation for Bonfire.Common.ContextModule.query_module/0.

Link to this function

request(user, type, object, opts \\ [])

View Source

Requests to do something, and federates it.

Examples

iex> request(subject, Follow, object)
{:ok, request}
Link to this function

requested(request, opts \\ [])

View Source

Retrieves a request.

Examples

iex> requested(request, current_user: me)
{:ok, request}
Link to this function

requested?(subject, type, object)

View Source

Checks if a request has been made.

Examples

iex> requested?(subject, type, object)
true

Callback implementation for Bonfire.Common.ContextModule.schema_module/0.

Link to this function

unrequest(requester, type, object)

View Source