diff --git a/src/ActivityPub.php b/src/ActivityPub.php index cb8b9cc..0393512 100644 --- a/src/ActivityPub.php +++ b/src/ActivityPub.php @@ -3,6 +3,7 @@ namespace ActivityPub; require_once __DIR__ . '/../vendor/autoload.php'; +use ActivityPub\Activities\CreateHandler; use ActivityPub\Activities\NonActivityHandler; use ActivityPub\Activities\ValidationHandler; use ActivityPub\Auth\AuthListener; @@ -93,6 +94,7 @@ class ActivityPub { $dispatcher->addSubscriber( $this->module->get( NonActivityHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( ValidationHandler::class ) ); + $dispatcher->addSubscriber( $this->module->get( CreateHandler::class ); } } ?> diff --git a/src/Config/ActivityPubModule.php b/src/Config/ActivityPubModule.php index 58f31a9..b886004 100644 --- a/src/Config/ActivityPubModule.php +++ b/src/Config/ActivityPubModule.php @@ -1,6 +1,9 @@ injector->register( Router::class, Router::class ) ->addArgument( new Reference( GetController::class ) ) ->addArgument( new Reference( PostController::class ) ); + + $this->injector->register( NonActivityHandler::class, NonActivityHandler::class ); + $this->injector->register( ValidationHandler::class, ValidationHandler::class ); + $this->injector->register( CreateHandler::class, CreateHandler::class ) + ->addArgument( new Reference( ObjectsService::class ) ) + ->addArgument( new Reference( IdProvider::class ) ) + ->addArgument( new Reference( CollectionsService::class ) ); } /**