Skip to content
Added
------------------------

- `Federails::Actor`: Add `.distant` scope to select distant actors
- `Federails::Request`: Add `.dereference` method to... dereference an object
- New feature: Federated entities. This allows model configuration to ease the process of creating Fediverse entities
from local content, and database entries from Fediverse content. When configured:
    - "Create" activities will be created on data creation
    - Incoming "Create" activities will be dispatched on supported models to create data locally
    - "Update" activities will be created on data update
    - Incoming "Update" activities will be dispatched on supported models to update (or create if missing) data locally
    - Ability to support the same Fediverse type with multiple models (note: only one model finally handles the object,
    check documentation for more)
- Data transformer for Notes: `Federails::DataTransformer::Note`, to ease transforming local data to Fediverse Notes
- Server: new "published" controller to render published `Federails::DataEntity` as federated object. This controller
will answer to the `federated_url` generated for local content.
- New helper module with methods to find local data from an ActivityPub object: `Federails::Utils::Object`:
    - `find_or_initialize(object_or_id)` returns nil when object is not found remotely
    - `find_or_initialize!(object_or_id)` raises an error when object is not found remotely
    - `find_or_create!(object_or_id)` raises an error when object is not found remotely
    - `timestamp_attributes(hash)` returns hash with `created_at`/`updated_at` attributes from the ActivityPub object