Skip to content

Commit a4b7067

Browse files
committed
fix(ContextChat): Make context chat work
1 parent b169a97 commit a4b7067

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/AppInfo/Application.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function register(IRegistrationContext $context): void {
9898

9999
$context->registerMiddleware(ExceptionMiddleware::class);
100100

101-
$context->registerEventListener('OCA\ContextChat\Event\ContentProviderRegisterEvent', 'OCA\Bookmarks\ContextChat\ContextChatProvider');
101+
$context->registerEventListener(\OCA\ContextChat\Event\ContentProviderRegisterEvent::class, \OCA\Bookmarks\ContextChat\ContextChatProvider::class);
102102
}
103103

104104
/**
@@ -107,6 +107,7 @@ public function register(IRegistrationContext $context): void {
107107
* @throws \Throwable
108108
*/
109109
public function boot(IBootContext $context): void {
110+
$this->getContainer()->get(\OCA\Bookmarks\ContextChat\ContextChatProvider::class)->register();
110111
$container = $context->getServerContainer();
111112
CreateBookmark::register($container->get(IEventDispatcher::class));
112113
}

lib/ContextChat/ContextChatProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public function handle(Event $event): void {
6868
}
6969
}
7070

71-
public function register(ContentProviderRegisterEvent $event): void {
72-
$event->registerContentProvider($this->getAppId(), $this->getId(), self::class);
71+
public function register(): void {
72+
$this->contentManager->registerContentProvider($this->getAppId(), $this->getId(), self::class);
7373
$this->eventDispatcher->addServiceListener(CreateEvent::class, self::class);
7474
$this->eventDispatcher->addServiceListener(UpdateEvent::class, self::class);
7575
$this->eventDispatcher->addServiceListener(BeforeDeleteEvent::class, self::class);

0 commit comments

Comments
 (0)