Setting up an ActivityPub Actor

This topic covers setting up an ActivityPub Actor in Discourse with the Discourse ActivityPub Plugin. If you’re not sure what this means, head on over to the Discourse ActivityPub Plugin topic first.

Next Step

Instructions

To create an ActivityPub actor:

  1. Go to Admin > Plugins > ActivityPub.
  2. Click “Add Actor”.
  3. Fill out the Add Actor form (the settings are explained below).
  4. Click “Save Actor”.

When you save the Actor, other Actors in the fediverse can start following it. You can disable an actor, by toggling the “Enabled” toggle on the right of the Edit Actor view.

Actor settings

Username

This is the first part of the Actor’s ActivityPub handle, e.g. announcements is the username of announcements@meta.discourse.org. This will be the base for the Actor’s User’s username on remote Discourse instances (if the username is already taken on that instance, an integer will be added for uniqueness)

:point_right: This property translates to the preferredUsername in the ActivityPub specification.
:point_right: Currently, this cannot be changed once set. This will change if or when this PR to Mastodon is merged.

Name

This is the display name of the Actor. How it is used will depend on how other services implement it. In Discourse this will become the Actor’s User’s “Name”.

Visibility

This determines whether Activities published by the Actor have “Public Addressing”. You should leave this as public unless you know what you’re doing.

:point_right: This is essentially the same as the difference between “public” and “private” (followers-only) posts on on Mastodon.

Post object type

This determines whether the Actor will publish posts as a Note or an Article. You should leave this as Note unless you know what you’re doing.

:point_right: Mastodon will only publish a link to the original post if it receives an Article.

Publication type

Full Topic

All the posts in a topic associated with the Actor will be published and all replies from the Fediverse to be turned into posts.

First Post

Only the first post in a topic associated with the Actor will be published and no replies from the Fediverse will be turned into posts.

1 Like

I just added the plugin to a discourse 3.3.2 installation. I can see the plugin in the list of plugin, the plugin preferences, etc.

However, when trying to add actors, I can only add actors for Tags (which i don’t need), but not for categories. It looks like some kind of UI / browser-side javascript problem (I’m not a web developer).

I’ve tried with both Firefox and Chromium on Debian, and both render the same behaviour

  • adding actors for Tags works as expectred
  • adding actors for Categories is impossible as no selection box for the categories is ever rendered right of the Select a model / Category choice.

I’m getting a

runtime.js:912 Uncaught TypeError: Cannot read properties of null (reading 'firstNode')
    at ue.firstNode (runtime.js:912:1)
    at T (runtime.js:241:1)
    at ue.reset (runtime.js:983:1)
    at ae.resume (runtime.js:686:1)
    at Ut.handleException (runtime.js:4309:1)
    at Vt.handleException (runtime.js:4521:1)
    at Dt.throw (runtime.js:4260:1)
    at $e.evaluate (runtime.js:2088:1)
    at Dt._execute (runtime.js:4247:1)
    at Dt.execute (runtime.js:4232:1)
    at qt.rerender (runtime.js:4547:1)
    at hr.render (index.js:4674:1)
    at index.js:4934:1
    at Nt (runtime.js:4080:1)
    at gr._renderRoots (index.js:4916:1)
    at gr._renderRootsTransaction (index.js:4960:1)
    at gr._revalidate (index.js:4992:1)
    at invoke (backburner.js.js:280:1)
    at h.flush (backburner.js.js:197:1)
    at p.flush (backburner.js.js:358:1)
    at B._end (backburner.js.js:798:1)
    at B.end (backburner.js.js:589:1)
    at B._run (backburner.js.js:842:1)
    at B._join (backburner.js.js:819:1)
    at B.join (backburner.js.js:629:1)
    at l (index.js:81:1)
    at u.onHover (index.js:118:1)
    at e.handleMouseEnter (select-kit-row.js:83:22)

error in the developer console when Selecting “Category” from the “Select a Model” button.

Generally, support is only provided on Meta for the latest stable or tests-passed releases - any reason why you are lagging? It’s worth upgrading to latest and trying again.

It was a typo, sorry. I’m on 3.3.2.

1 Like

Hey @LaF0rge, this plugin currently only supports the latest version of Discourse. See further:

1 Like

Hi @angus - thanks for your response. Sadly I’m not willing to upgrade our production installation to a beta version or the current git master. I guess I’ll be waiting until a new stable version of discourse has been tagged/released.

By the way: Is there some structured information available that would indicate the minimum version requirement of a plugin? I didn’t see it here in the initial post of the thread, and also not on GitHub - discourse/discourse-activity-pub: Adds ActivityPub support to Discourse.

In other software projects/products, plugins usually indicate version compatibility.

Given that the plugin has been around for more than a year, I guess another option would be to downgrade to an earlier version of the plugin, from around the time where 3.3.2 was current? However, in the commit log I couldn’t immediately see any references to discourse versions.

Unless you have a specific reason not to do so, it’s recommended to use the tests-passed branch of Discourse. See further:

Furthermore, you can assume that plugin or customisation with the experimental tag (as the ActivityPub plugin doees) only works reliably on the latest version of Discourse.

More specifically to your implicit questions about version management, in Discourse plugins this handled via the .discourse-compatibility file which you can read about here:

See the ActivityPub plugin’s compatibility file here:

As the ActivityPub plugin is still experimental, ensuring backwards compatibility has not been a focus, nevertheless I will investigate adding explicit 3.3.2 support to that file early next week.

But as mentioned above, unless you have a good reason not to, I’d suggest using tests-passed.

2 Likes

@LaF0rge I just looked at this.

The plugin does not need to add explicit 3.3.2 support as it already has this in the compatibility file.

< 3.4.0.beta1-dev: 3a6512d0560211b93f022a27ed7276024d0020dc

If you’re using a standard install of Discourse on 3.3.2 then you will be automatically be on commit 3a6512d0560211b93f022a27ed7276024d0020dc of the plugin for which the category dropdown works. See further: