mirror of
https://github.com/nextcloud/server.git
synced 2025-07-24 12:19:26 +00:00
feat(ContextChat): add isContextChatAvailable method to OCP API
Signed-off-by: Edward Ly <contact@edward.ly>
This commit is contained in:
@ -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 {
|
public function registerContentProvider(string $appId, string $providerId, string $providerClass): void {
|
||||||
$this->contentManager?->registerContentProvider($appId, $providerId, $providerClass);
|
$this->contentManager?->registerContentProvider($appId, $providerId, $providerClass);
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,14 @@ namespace OCP\ContextChat;
|
|||||||
* @since 32.0.0
|
* @since 32.0.0
|
||||||
*/
|
*/
|
||||||
interface IContentManager {
|
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 $appId
|
||||||
* @param string $providerId
|
* @param string $providerId
|
||||||
|
Reference in New Issue
Block a user