Activitypub and changed domains

I don’t seem to be picking up activitypub posts from any of my mastodon/fediverse accounts any more.

I moved my forum from https://club.tidalcycles.org/ to https://uzu.lurk.org/ , and think this might well be the cause. I have a feeling that activitypub doesn’t handle changing domains at all well.

I tried destroying and recreating one of the category activitypub actors in discourse, and then resubscribe to that, but it still isn’t working - maybe because the post comes from a user, and is then reposted by the category.

Do I need to reset the plugin and its followers completely, and if so what’s a good way of going about that?

Yeah, there’s no functionality for changing domains in the plugin at all right now as far as I can see… and there’s also no reset functionality, so you’d have to dig into the database and replace the URL manually or start from scratch. Maybe @pmusaraj or @angus have advice for a best past forward?

I just realized I am faced with this as well, after changing my site’s url to digitallysovereign.org.

Looks like there is actually no way around removing and reinstalling the plugin, and recreating all the actors, because existing followers on Mastodon or wherever else won’t automatically know about your domain change. Their servers cached your old actor URL.

I only had two followers so far so removing and reinstalling is a no brainer.

Edit: forgot that removing and reinstalling doesn’t remove plugin data. This rails command did the trick.

tables = [
  "discourse_activity_pub_actors",
  "discourse_activity_pub_follows",
  "discourse_activity_pub_activities",
  "discourse_activity_pub_attachments",
  "discourse_activity_pub_authorizations",
  "discourse_activity_pub_clients",
  "discourse_activity_pub_collections",
  "discourse_activity_pub_logs",
  "discourse_activity_pub_objects"
]

ActiveRecord::Base.connection.execute("TRUNCATE #{tables.join(', ')} CASCADE")
puts "All ActivityPub tables cleared!"

Edit 2: I can confirm that doing the above rails command and recreating the actor worked - I did not have to remove and reinstall the plugin.