diff --git a/lib/private/ContextChat/ContentManager.php b/lib/private/ContextChat/ContentManager.php index 2185829a633..eae017b462d 100644 --- a/lib/private/ContextChat/ContentManager.php +++ b/lib/private/ContextChat/ContentManager.php @@ -16,6 +16,10 @@ class ContentManager implements IContentManager { ) { } + public function isContextChatAvailable(): bool { + return $this->contentManager !== null; + } + public function registerContentProvider(string $appId, string $providerId, string $providerClass): void { $this->contentManager?->registerContentProvider($appId, $providerId, $providerClass); } diff --git a/lib/public/ContextChat/IContentManager.php b/lib/public/ContextChat/IContentManager.php index b6a81892e15..34682b3329a 100644 --- a/lib/public/ContextChat/IContentManager.php +++ b/lib/public/ContextChat/IContentManager.php @@ -11,6 +11,14 @@ namespace OCP\ContextChat; * @since 32.0.0 */ interface IContentManager { + /** + * Checks if the context chat app is enabled or not + * + * @return bool + * @since 32.0.0 + */ + public function isContextChatAvailable(): bool; + /** * @param string $appId * @param string $providerId