Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] ActivityPub tests & following #20206

Merged
merged 7 commits into from
May 15, 2024
Merged

[WIP] ActivityPub tests & following #20206

merged 7 commits into from
May 15, 2024

Conversation

allouis
Copy link
Contributor

@allouis allouis commented May 14, 2024

馃崷

@github-actions github-actions bot added the affects:admin Anything relating to Ghost Admin label May 14, 2024
ref https://linear.app/tryghost/issue/MOM-73

We need to add body parsing middleware here, so that NestJS has access to it.
We also attach the rawBody which is used to validate the HTTP Signatures
ref https://linear.app/tryghost/issue/MOM-73

We've made it easier to use by adding defaults for required header, as well as
adding support for signing POST requests.
ref https://linear.app/tryghost/issue/MOM-120

We need to do this to lookup the inbox which we need to send a Follow activity
ref https://linear.app/tryghost/issue/MOM-120

This will allow us to deliver Follow activities to other sites
The supertest lib is the officially recommended way of testing NestJS e2e
With TypeScript, when creating mock instances, it's preferable to maintain a
reference to the params, even if they're not used. This allows us to have
unused variables as long as they're prefixed with an underscore.
ref https://linear.app/tryghost/issue/MOM-108

Apologies to my future self and maintainers if you come across this commit.

This is a bit of a mega commit because we need to cut corners somewhere and it
came down to commit atomicity or tests/code quality.

The main changes here are a bunch of tests, as well as some scaffolding for
Inbox handling of Activities and delivery of Activities. The structure is not
final at all - and we have logic split across services which isn't ideal - but
thsi will do for now as we play around and discover the structure through
building.
@github-actions github-actions bot removed the affects:admin Anything relating to Ghost Admin label May 15, 2024
@allouis allouis merged commit df1774d into main May 15, 2024
22 checks passed
@allouis allouis deleted the activitypub-rebasing branch May 15, 2024 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant