Some progress towards accepting and rejecting follows #3

Merged
steffo merged 22 commits from feature/follows into main 2024-10-23 05:47:18 +00:00
Showing only changes of commit 58d4e3b8a4 - Show all commits

View file

@ -27,6 +27,7 @@ export class DotinoVeloce {
.setActorDispatcher("/users/{identifier}", this.#actorHandler.bind(this)) .setActorDispatcher("/users/{identifier}", this.#actorHandler.bind(this))
.setKeyPairsDispatcher(this.#actorKeys.bind(this)) .setKeyPairsDispatcher(this.#actorKeys.bind(this))
.mapHandle(this.#actorMapper.bind(this)) .mapHandle(this.#actorMapper.bind(this))
.authorize(this.#authorizationHandler.bind(this))
this.federation this.federation
.setInboxListeners("/inbox/{identifier}", "/inbox") .setInboxListeners("/inbox/{identifier}", "/inbox")
@ -248,6 +249,10 @@ export class DotinoVeloce {
return result return result
} }
async #authorizationHandler(_ctx: Context<ContextData>, _handle: string, _signedKey: unknown, _signedKeyOwner: unknown): Promise<boolean> {
return true
}
async #followHandler(ctx: Context<ContextData>, follow: Follow) { async #followHandler(ctx: Context<ContextData>, follow: Follow) {
l.info`Handling follow request: ${follow}` l.info`Handling follow request: ${follow}`