diff --git a/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_32.rst b/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_32.rst index 0c6dcac1242..5dfdba5b1c9 100644 --- a/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_32.rst +++ b/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_32.rst @@ -36,6 +36,7 @@ Back-end changes Added APIs ^^^^^^^^^^ +- New ``OCP\ContextChat`` API. See :ref:`context_chat` for details. - New task processing task type ``OCP\TaskProcessing\TextToSpeech`` to convert text to speech. - New interface ``\OCP\Share\IShareProviderSupportsAllSharesInFolder`` extending ``\OCP\Share\IShareProvider`` to add the method ``\OCP\Share\IShareProviderSupportsAllSharesInFolder::getAllSharesInFolder`` used for querying all shares in a folder without filtering by user. - New method ``\OCP\IUser::canChangeEmail`` allowing to check if the user backend allows the user to change their email address. diff --git a/developer_manual/digging_deeper/context_chat.rst b/developer_manual/digging_deeper/context_chat.rst index 242168f25f0..e2574a208a6 100644 --- a/developer_manual/digging_deeper/context_chat.rst +++ b/developer_manual/digging_deeper/context_chat.rst @@ -71,7 +71,8 @@ To add content and register your provider implementation you will need to use th The ``IContentManager`` class has the following methods: - * ``registerContentProvider(string $providerClass)`` + * ``isContextChatAvailable()``: Returns ``true`` if the Context Chat app is enabled, ``false`` otherwise. + * ``registerContentProvider(string $providerClass)``: Register a new content provider. * ``submitContent(string $appId, array $items)``: Providers can use this to submit content for indexing in Context Chat. * ``updateAccess(string $appId, string $providerId, string $itemId, string $op, array $userIds)``: Update the access rights for a content item. Use ``\OCP\ContextChat\Type\UpdateAccessOp`` constants for the ``$op`` value. * ``updateAccessProvider(string $appId, string $providerId, string $op, array $userIds)``: Update the access rights for all content items from a provider. Use ``\OCP\ContextChat\Type\UpdateAccessOp`` constants for the ``$op`` value. @@ -115,7 +116,10 @@ if you want to trigger an initial import of content items. Submitting ContentItem data ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -To submit content, wrap it in an ``\OCP\ContextChat\ContentItem`` object: +Before submitting, you should check that the Context Chat app is enabled first +by calling the ``isContextChatAvailable()`` method. + +Then, to submit content, wrap it in a list of ``\OCP\ContextChat\ContentItem`` objects: .. code-block:: php