-
-
Notifications
You must be signed in to change notification settings - Fork 7
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for updating the site actor #207
Open
allouis
wants to merge
4
commits into
main
Choose a base branch
from
activitypub-initialisation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mike182uk
reviewed
Nov 25, 2024
mike182uk
reviewed
Nov 25, 2024
src/handlers.ts
Outdated
}); | ||
} | ||
|
||
async function updateSiteActor(db: KvStore, logger: Logger, host: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could move this to the actor helpers and add a test?
ref https://linear.app/ghost/issue/AP-592 We need to start moving logic out of HTTP handlers. This logic needs to be reused so that we can update the site actor when initialising the site.
ref https://linear.app/ghost/issue/AP-592 We don't want to define our HTTP handlers inline in app.ts, instead pulling them into separate files, this will keep app.ts smaller and let use share code between the handlers easier.
allouis
force-pushed
the
activitypub-initialisation
branch
from
December 2, 2024 09:42
abea97a
to
9fb5abd
Compare
ref https://linear.app/ghost/issue/AP-592 When we fetch the site data we'll attempt to update the site actor too, this will ensure that when Ghost boots any changes are propagated to us. We're handling the sending of the Update activity ourself, and there's room to remove duplication here. I'd like to think about what pattern we use for this. Ideally I think a repository would be responsible for this or at least abstract it.
ref https://linear.app/ghost/issue/AP-592 This just pulls out some shared logic into the update actor function, I'm not 100% on colocated storage and AP network code but I think it's fine for now while we work the structure out.
allouis
force-pushed
the
activitypub-initialisation
branch
from
December 2, 2024 10:00
9fb5abd
to
392f965
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ref https://linear.app/ghost/issue/AP-592
When we fetch the site data we'll attempt to update the site actor too, this
will ensure that when Ghost boots any changes are propagated to us.
We're handling the sending of the Update activity ourself, and there's room to
remove duplication here. I'd like to think about what pattern we use for this.
Ideally I think a repository would be responsible for this or at least abstract
it.