-
0.5.0afab0f13 · ·
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
-
0.4.0b4425e11 · ·
Added ------------------ - Added `Federails.actor_entity(class_or_instance)` method which returns the configuration Changed ------------------ - Methods included in `Federails::Entity` are renamed with `federails` in them to avoid confusion and make projects with _actors_ able to use the gem - [**BREAKING**] Concern `Federails::Entity` has been renamed to `Federails::ActorEntity` - Internal method `Federails::Configuration.register_entity` has been renamed to `Federails::Configuration.register_actor_class`. - [**BREAKING**] Configuration key `Federails::Configuration.entity_types` has been renamed to `Federails::Configuration.actor_types`
-
0.3.05e9e91ba · ·
- Base controller for client controllers can be specified to something different from `ActionController::Base` with the `base_client_controller` option - New generator: `federails:copy_client_views`, that copies all the client views in `app/views/federails/client` for override - Added `auto_create_actors` option for `acts_as_federails_actor` method to disable automatic actor creation. - Added helper method `Federails.actor_entity?` to check if a given class/instance may have associated actors - Dynamic dispatch of activities with `after_activity_received` (e.g.: `after_activity_received 'Create', 'Note', :create_note`) - Ability to add custom data to actor responses - Handle URI-only objects in dynamic dispatch - Client: reworked the views: - Extracted some sections in reusable partials - Improved listings with no entries - Improved conditional display for some sections - Handled the case where the current user does not have an associated actor - Handled the case where the current user's class is not configured with `acts_as_federails_actor` - As actors' subject is a polymorphic relation, these Federails configuration options were removed: `user_class`, `user_table`, `user_profile_url_method`, `user_name_field` and `user_username_field` - `acts_as_federails_actor` is not automatically called when `Federails::Entity` concern is included in models. - Client controllers: enforce authorization calls on controller actions - Server controllers: enforce authorization calls on controller actions - Mime types: Don't consider "application/json" as "application/ld+json"