Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(ContextChat): add isContextChatAvailable method to OCP API
Signed-off-by: Edward Ly <[email protected]>
  • Loading branch information
edward-ly committed Jul 15, 2025
commit 48406c31f9f8818c0e6ead1cefd49d450dba5683
4 changes: 4 additions & 0 deletions lib/private/ContextChat/ContentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ public function __construct(
) {
}

public function isContextChatAvailable(): bool {
return $this->contentManager !== null;
}

public function registerContentProvider(string $appId, string $providerId, string $providerClass): void {
$this->contentManager?->registerContentProvider($appId, $providerId, $providerClass);
}
Expand Down
8 changes: 8 additions & 0 deletions lib/public/ContextChat/IContentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
* @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
Expand Down