neet / masto.js

🐘 Universal Mastodon API client for JavaScript
https://neet.github.io/masto.js/
MIT License
726 stars 46 forks source link

Support for other ActivityPub object types #939

Open nileshtrivedi opened 1 year ago

nileshtrivedi commented 1 year ago

There exist Mastodon-forks which support ActivityPub object types other than Note. Such as Article which is intended for long-form posts.

Example: HomeTown

Mastodon.social does not support these types which has unfortunately led to all other apps in fediverse being forced to shoehorn their content into Note for reach.

I wanted to add this support in Elk client and created this issue a while ago, but then realized that ActivityPub object types will probably need to be supported in masto.js first as Elk depends on it.

nileshtrivedi commented 1 year ago

Here is an Article that renders fine in a Hometown instance: https://friend.camp/@blog@write.as/110634294101963133 :

image

but not in Elk.zone which uses masto.js. Instead, a separate Note has to be posted: https://elk.zone/fosstodon.org/@blog@write.as/110634298551276691 :

image
neet commented 1 year ago

@nileshtrivedi Thank you for your valuable feedback.

Unfortunately, Masto.js is unable to take advantage of some of the features offered by forks such as Hometown, Akkoma, Pleroma, and Fedibird, nor is it easy to extend them.

Masto.js was initially intended to be a Mastodon-specific library. Still, after glimpsing the current state of development of third-party apps and other applications using Masto.js, we have come to believe that we should avoid making it a hindrance to the spread of Mastodon forks

It can be essential criteria that whether or not an existing Mastodon client works for users who try a new ActivityPub implementation. It would be especially problematic when their unique features are not available at all for third-party clients.

Therefore, we would like to provide the ability to extend the functionality of Masto.js with plugins in the future. This will be like day.js or i18next, which anyone can develop their own plugins and use easily.

We do not have a release date in mind at this time, but we hope to include it in v7.0.0 at least. We welcome any feedback on the API design of the plugin feature.

GerritKuilder commented 10 months ago

I played around yesterday with pleroma and noticed that the api does not pass the content_type, so That would be nice to have.