Working with the ActivityPub Plugin

OK, I think that this is due to my testing leaving me with a broken database, and I should blow away my test site and start over.

[edit: useless detail removed to clean the thread]

My assumption is that this is something that would take a database migration to fix, that it’s due to me running pre-merged code for testing, and therefore I should blow away my test site and start over.

Yes, that’s what I’d advise.


As I prepare to do this, I have a question.

On mastodon, there’s a self-destruct command for a clean exit to avoid problems from server keys being remembered, that is recommended not only if you are closing down a server, but also if you are resetting an instance to the point where you are regenerating new keys. I don’t know whether you have run into this in your testing so far. It looks like Mastodon does a Delete Actor for each local Actor. I don’t see functionality to do this in the plugin, but I recognize that I might be missing it.

For the mastodon server I run, I think that tootctl domains purge should be enough, but I’ve also been testing with a vanilla mastodon “alt” where I don’t have admin. :smiling_face:

…I did the restore, and as it happens, event tootctl domains purge isn’t enough for me to be able to successfully follow after the restore. The posts just don’t show up on Mastodon at all. I have enabled verbose ActivityPub logs so that I can debug more, but I haven’t found where to look to find them. and I have now found them in the rails logs, so I should be back to being able to investigate on my own.

Hey @mcdanlj :slight_smile:

I should amend that to, I can’t provide support in this topic. If you’re having issues with Mastodon or Discourse development I can help you out in the right places (e.g. dev), but I don’t want to clutter up this topic.


I’m sorry, I was thinking of the questions about self-destruct and where the verbose logs setting logged to as of general relevance. Trying to avoid asking for support here. :grimacing: Don’t mind if what looks like clutter is moved out of this topic.

Sorry for the noise. I installed the official plugin on my test site, then restored a backup of my production site that has never seen any form of the activitypub plugin, then set up activitypub, so it should be pristine to the best of my knowledge.

In the future, if I’m testing a branch, I’ll:

  • start with a clean released plugin, with all actors already created that I’m going to use
  • take a backup
  • install the branch
  • test posts
  • erase all the test posts
  • revert to the clean released plugin
  • restore the backup
  • report any problems I found with the branch in the PR and not in this thread

That should keep a clean database and a clean thread.

Not showing my site icon was not due to testing a branch of the plugin, nor was it a bug in the plugin. The logo doesn’t show in Mastodon for my posts because my large_icon_url is to an SVG and Mastodon apparently doesn’t handle SVG for actor icons. Unless there is some normal trivial path to downgrade to png for ActivityPub, probably nothing to do here.

I’m curious about what the intent is for the formatting and presentation for Note and Article.


For Note, when I post from Mastodon Glitch to vanilla Mastodon with markdown, it is displayed in Glitch as rich text, and in vanilla Mastodon as plain text with markdown stripped.

Writing this in Mastodon Glitch with Markdown enabled:

…shows this on Mastodon Glitch:

…and shows this on vanilla Mastodon:

However, if I author rich text in Discourse with a Note:

…I get this in Mastodon Glitch:

…and this in vanilla Mastodon:

…which looks just about the same.

When I use the web client for that same post, it does include some newlines, but still has markdown font formatting wiped out:

Most of the fediverse actually can handle markdown, so it would be good for it to carry across.

Also, I note that hashtags do not come across in Mastodon as hashtags.


For posting an Article, what do you expect to be displayed in Mastodon?

What I’m seeing on PR 21 is just the URL and a small onebox with not much text.

I don’t know how much of that is on the Mastodon side; I haven’t set up, for example, a Firefish instance to compare.