mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-02 17:59:36 +07:00
Merge pull request #13409 from nextcloud/fix/context-chat-manager
fix(developer): add isContextChatAvailable method to Context Chat OCP API
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user