diff options
author | Edward Ly <contact@edward.ly> | 2025-07-11 08:26:00 -0700 |
---|---|---|
committer | Edward Ly <contact@edward.ly> | 2025-07-15 08:16:25 -0700 |
commit | 48406c31f9f8818c0e6ead1cefd49d450dba5683 (patch) | |
tree | 15043f2ae9ef38df9d64654c4893077a523234bf | |
parent | 86533681e81201d11936fda443d8104747cc0ef4 (diff) | |
download | nextcloud-server-48406c31f9f8818c0e6ead1cefd49d450dba5683.tar.gz nextcloud-server-48406c31f9f8818c0e6ead1cefd49d450dba5683.zip |
feat(ContextChat): add isContextChatAvailable method to OCP API
Signed-off-by: Edward Ly <contact@edward.ly>
-rw-r--r-- | lib/private/ContextChat/ContentManager.php | 4 | ||||
-rw-r--r-- | lib/public/ContextChat/IContentManager.php | 8 |
2 files changed, 12 insertions, 0 deletions
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 @@ -12,6 +12,14 @@ namespace OCP\ContextChat; */ 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 * @param class-string<IContentProvider> $providerClass |