Skip to content

Commit 70204ea

Browse files
edward-lymarcelklehr
authored andcommitted
feat(ContextChat): add isContextChatAvailable method to OCP API
Signed-off-by: Edward Ly <[email protected]>
1 parent b5a3e40 commit 70204ea

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

lib/private/ContextChat/ContentManager.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ public function __construct(
1616
) {
1717
}
1818

19+
public function isContextChatAvailable(): bool {
20+
return $this->contentManager !== null;
21+
}
22+
1923
public function registerContentProvider(string $appId, string $providerId, string $providerClass): void {
2024
$this->contentManager?->registerContentProvider($appId, $providerId, $providerClass);
2125
}

lib/public/ContextChat/IContentManager.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
* @since 32.0.0
1212
*/
1313
interface IContentManager {
14+
/**
15+
* Checks if the context chat app is enabled or not
16+
*
17+
* @return bool
18+
* @since 32.0.0
19+
*/
20+
public function isContextChatAvailable(): bool;
21+
1422
/**
1523
* @param string $appId
1624
* @param string $providerId

0 commit comments

Comments
 (0)