Yes, I have thought about it and I think I know more or less how I want to do it. I haven't been able to spend time actually implementing it though.
So far, here's how it would work from the admin's standpoint. I'd like to add an option on the add-on's configuration page that lists all allowed Mastodon hosts. By default, it would only have
mastodon.social
and you'd be able to add your own. Adding hosts would enable it for future embeds. Removing hosts would disable it from existing embeds, in case an instance goes rogue. On the user side, the BBCode would look like this
[MEDIA=mastodon]host=mastodon.social;id=109262705755044079;name=Gargron[/MEDIA]
. In theory I could make it look nice like
[MEDIA=mastodon]Gargron@mastodon.social/109262705755044079[/MEDIA]
but I try to avoid unnecessary customizations if I can. Mastodon.social would be the default host and could be omitted from the BBCode. I work under the assumption that all Mastodon instances run on the default HTTPS port, please let me know if that's not the case.
I haven't written the backend on the XenForo side yet. From a technical standpoint, I'll need to modify the media site every time the list of hosts is modified, in order to change the regular expression that matches the kind of URLs that should be considered Mastodon instances. I haven't looked up the proper way to do that yet. On the frontend, the code required is
already on GitHub, but currently disabled.
I'd love to give an ETA but I've had a hellish end of year so I don't know when I'll be able to work on it. At any rate, this is my top priority for new development.
