FedStoa / moa

A Mastodon, Twitter, and Instagram Cross-poster
https://moa.party
MIT License
355 stars 19 forks source link

Swap Bridge.mastodon_account_id from BigInteger to String to support Pleroma #155

Open ibeckermayer opened 3 years ago

ibeckermayer commented 3 years ago

I was attempting to use moa.party to connect my Twitter with a Pleroma account, and was being flashed "Your server isn't supported by moa." I hunted this down in the codebase, and it looks like it's being thrown after bridge.mastodon_account_id = int(account_id) fails in mastodon_oauthorized().

I've examined both my Mastodon and Pleroma databases, and it appears that the incompatibility arises from the fact that Pleroma uses string UUIDs for account id's whereas Mastodon uses integers. I believe that if you simply flipped mastodon_last_id = Column(BigInteger, default=0) and mastodon_account_id = Column(BigInteger, default=0) to type String(30), you could support Pleroma (which afaik implements the Mastodon api).