Allow any entity to be actor

Created on 2 November 2022, over 2 years ago
Updated 17 February 2025, about 2 months ago

Problem/Motivation

As explained in #3272173 . But focusing on first scenario:

>> ... Create a Group (as in multiple users who are members of a Group defined by the Group module) controlled activitypub group type actor.

Proposed resolution

Be more generic when picking entity for an actor.
Replace user by generic entity (but preserving all the existing and working code for user -> person case)
Let other modules to implement their own kind of actors.

New route proposal.

In the issue branch there's a Draft implementation in "self" routes:

As now the route /user/{user_id}/activitypub/{actor} is used, It will be great to use
/{entity_type}/{entity_id}/activitypub/{actor} for routes, to use an agnostic method to generate the output, but this is not possible as the first item in path cannot be an argument as said in https://www.drupal.org/docs/drupal-apis/routing-system/structure-of-routes :

the first item of the path cannot be an argument, and must be a string.

So a broader /actor/{entity_type}/{entity_id}/activitypub/{actor} could be used. The same for selfjson controller method.
It needs to be decided where to map the drupal entities to actor types, if it could be in activitypub module or in dedicated module.

If accepted it can be extended to other routes that are user dependent (inbox, outbox, followers, following and delete routes), but these are not as critical as canonical user route, so these actor routes could be replaced to be more compatible with different kind of entities.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain aleix

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇬🇧United Kingdom joachim

    What about the actor not being an entity at all?

    My use case is a personal blog site. I want to configure which node types are posts, but I don't need it to be tied to a user account.

    There is https://www.drupal.org/project/site_entity which provides a singleton site entity, but it doesn't have any releases and looks abandoned.

  • 🇧🇪Belgium swentel

    Hmm there's already the concept of a 'Site wide actor' in the module, but that still means an entity of course. The activity entity currently has an owner field, but having no owner (basically, anonymous) could work. Sounds like a good feature request which could live in its own dedicated issue. Question is, as always, time of course :)

Production build 0.71.5 2024