robertoszek / pleroma-bot

Bot for mirroring one or multiple Twitter accounts in Pleroma/Mastodon/Misskey.
https://robertoszek.github.io/pleroma-bot
MIT License
104 stars 18 forks source link

Please add support for Akkoma #103

Closed realkinetix closed 1 year ago

realkinetix commented 1 year ago

Hi!

Akkoma is a fork of Pleroma, but identifies in nodeinfo as 'akkoma'.

It seems to be functionally equivalent - I just added an 'if' to _utils.py to make the bot work locally, but don't know if this is entirely the right solution:

if self.instance == "akkoma": self.instance = "pleroma"

That's in _get_instance_info(self)

robertoszek commented 1 year ago

Hi! Right, so far Akkoma's API is pretty much interoperable and the methods and endpoints function in the same way as Pleroma's (which may change in the future, who knows).

In this commit from 2 weeks ago on the develop branch I added a fallback for unknown software: https://github.com/robertoszek/pleroma-bot/commit/4dfabae5e51371ed26fcaf1f2fcea51c80cc76b9

Basically it treats any software found in nodeinfo as Pleroma if it doesn't match Mastodon, Pleroma or Misskey. Which means if you target an Akkoma instance it will treat it as if it was a Pleroma one and hope for the best. So, hopefully that would cover all Pleroma's forks.

This change will be rolled into the next stable release. But in case anyone needs it right now and they rather not manually edit the source code, they can install this release candidate: pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pleroma-bot==1.1.1rc57

If the APIs start to differ significantly I will add extra code for covering those special cases, please do let me know if you encounter any issues when targeting an Akkoma instance (so far I don't have a test account set up on an Akkoma server).

And for potential future forks of Misskey, Mastodon or Pleroma... I may have to add a way to override the type of software on the config, so you are able to tell it what's the closest match for the server you're targeting.

jmturner commented 1 year ago

Thanks for this change! I was mystified why my Akkoma server wasn't populating. 1.2.0 fixed it.