h3poteto / megalodon

Fediverse API client library for node.js and browser
https://h3poteto.github.io/megalodon/
MIT License
250 stars 33 forks source link

Question: Is it possible to retrieve the raw AcitivityStreams2 JSON-LD for a notification. #2199

Closed phochste closed 3 months ago

phochste commented 3 months ago

For a project I am using megalodon to retrieve all public notifications for an account using getNotifications and getNotifications. But, this provides me the parsed result. I would like to have read to the raw AS2 notifications (before it is parsed). Is this possible?

h3poteto commented 3 months ago

This library is a Fediverse client library, not an ActivityPub client. So it is not possible.


Basically, this library doesn't handle raw ActivityPub payloads. It requests Fediverse (Mastodon, Pleroma, etc...) servers to get notifications. These servers return JSON payload according to their API response, like https://docs.joinmastodon.org/methods/notifications/ ActivityStreams2 JSON is probably parsed on these server sides. So, megalodon can't see the raw ActivityStreams2 JSON.

phochste commented 3 months ago

Thanks for the information.