dahlia / fedify

ActivityPub server framework in TypeScript
https://fedify.dev/
MIT License
327 stars 13 forks source link

Vocabulary API: document loader inheritance #27

Closed dahlia closed 3 months ago

dahlia commented 3 months ago

Currently, to properly apply remote document loading strategy, we need to explicitly specify a document loader every time. It would be more ergonomic if the document loader is inherited, e.g.:

const object = undo.getObject(ctx);
assert(object instanceof Follow);
const actor = object.getActor(); // loaded using ctx